json-api.md 1.9 KB
Newer Older
Jason Huggins's avatar
Jason Huggins committed
1 2 3
## Go to any point:
    HTTP POST <robotURL>/go

Jason Huggins's avatar
Jason Huggins committed
4 5 6 7
    x: Center of circle, millimeters (Number, float)
    y: Center of circle, millimeters (Number, float)
    z: Center of circle, millimeters (Number, float)

Jason Huggins's avatar
Jason Huggins committed
8
    Example:
Jason Huggins's avatar
Jason Huggins committed
9 10
    { x: 0,
      y: 0,
Jason Huggins's avatar
Jason Huggins committed
11 12 13 14 15
      z: -144 }

## Draw a Circle:
    HTTP POST <robotURL>/circle

Jason Huggins's avatar
Jason Huggins committed
16 17 18 19 20 21 22 23 24
    x: Center of circle, millimeters (Number, float)
    y: Center of circle, millimeters (Number, float)
    z: Center of circle, millimeters (Number, float)
    radius: Radius of circle, millimeters (Number, float)
    startAngle: Starting angle, radians (Number, float)
    anticlockwise: Set to true to go anticlockwise, false to go clockwise (Boolean)
    delay: Number of milliseconds of delay to add between each point (Number, integer)
    rotations: Number of rotations (Number, integer)

Jason Huggins's avatar
Jason Huggins committed
25 26
    Note: This will draw complete circles. The end angle will be the same as the start angle.

Jason Huggins's avatar
Jason Huggins committed
27 28 29 30 31 32 33 34 35 36
    Example:
    { x: 0,
      y: 0,
      z: -158,
      radius: 20,
      startAngle: 0,
      anticlockwise: true,
      delay: 5,
      rotations: 5 }

Jason Huggins's avatar
Jason Huggins committed
37
## Draw an Arc:
Jason Huggins's avatar
Jason Huggins committed
38
    HTTP POST <robotURL>/arc
Jason Huggins's avatar
Jason Huggins committed
39 40 41 42 43 44 45 46 47 48

    x: Center of circle, millimeters (Number, float)
    y: Center of circle, millimeters (Number, float)
    z: Center of circle, millimeters (Number, float)
    radius: Radius of circle, millimeters (Number, float)
    startAngle: Starting angle, radians (Number, float)
    endAngle: Ending angle, radians (Number, float)
    anticlockwise: Set to true to go anticlockwise, false to go clockwise (Boolean)
    delay: Number of milliseconds of delay to add between each point (Number, integer)

Jason Huggins's avatar
Jason Huggins committed
49 50 51
    Note: This will draw one arc. If startAngle and endAngle are the same, it will draw one complete circle.
    If you want to draw more than one complete circle, use the "/circle" command.

Jason Huggins's avatar
Jason Huggins committed
52 53 54 55 56 57 58
    { x: 0,
      y: 0,
      z: -158,
      radius: 20,
      startAngle: 1.57,
      endAngle: 3.14,
      anticlockwise: false,
Jason Huggins's avatar
Jason Huggins committed
59
      delay: 5 }