Skip to content

Step Recording

Missions are sequences of motion steps stored as files in the ESP32’s flash storage. You can create missions, add steps by position or JSON command, edit individual steps, and play them back with repeat counts.

graph TD
    A[Create Mission] -->|T:220| B[Empty Mission File]
    B --> C{Add Steps}
    C -->|T:222| D[Append JSON Step]
    C -->|T:223| E[Append Feedback Step]
    C -->|T:224| F[Append Delay]
    D & E & F --> G[Mission Ready]
    G -->|T:242| H[Play Mission]
    G -->|T:221| I[View Contents]
    G -->|T:241| J[Move to Step]
{"T":220,"name":"pick_place","intro":"Pick and place demo sequence"}

This creates a new file in flash with the given name and description.

Append a motion command as a step:

{"T":222,"name":"pick_place","step":"{\"T\":104,\"x\":235,\"y\":0,\"z\":234,\"t\":3.14,\"spd\":0.25}"}

Any valid JSON command can be embedded as a step — including gripper commands, light controls, or delays.

Record the arm’s current position as a step (uses feedback data):

{"T":223,"name":"pick_place","spd":0.25}

Insert a timed pause between steps:

{"T":224,"name":"pick_place","delay":3000}

The delay is in milliseconds.

Insert JSON command at step 3:

{"T":225,"name":"pick_place","stepNum":3,"step":"{\"T\":104,\"x\":235,\"y\":0,\"z\":234,\"t\":3.14,\"spd\":0.25}"}

Insert from feedback at step 3:

{"T":226,"name":"pick_place","stepNum":3,"spd":0.25}

Insert delay at step 3:

{"T":227,"stepNum":3,"delay":3000}

Replace with JSON command:

{"T":228,"name":"pick_place","stepNum":3,"step":"{\"T\":114,\"led\":255}"}

Replace with feedback position:

{"T":229,"name":"pick_place","stepNum":3,"spd":0.25}

Replace with delay:

{"T":230,"name":"pick_place","stepNum":3,"delay":3000}
{"T":231,"name":"pick_place","stepNum":3}
{"T":221,"name":"pick_place"}

Returns the full content of the mission file, including all steps with their indices.

Navigate the arm to a particular step’s position without playing the full sequence:

{"T":241,"name":"pick_place","stepNum":3}
{"T":242,"name":"pick_place","times":3}

Set times to -1 for continuous playback:

{"T":242,"name":"pick_place","times":-1}

You can configure a mission to run automatically when the arm powers on:

Check current boot mission:

{"T":602}

Clear boot mission:

{"T":603}
T-CodeCommandDescription
220Create missionNew mission file with name and intro
221View missionRead all steps
222Append JSON stepAdd command string as step
223Append feedback stepRecord current position
224Append delayAdd timed pause
225Insert JSON stepInsert command at position
226Insert feedback stepInsert current position at index
227Insert delayInsert pause at position
228Replace with JSONOverwrite step with command
229Replace with feedbackOverwrite step with current position
230Replace with delayOverwrite step with pause
231Delete stepRemove step at index
241Move to stepGo to step position
242Play missionExecute with repeat count

Mission system reference from firmware source json_cmd.h and Waveshare Wiki.