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.
Mission Lifecycle
Section titled “Mission Lifecycle”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]
Creating a Mission
Section titled “Creating a Mission”{"T":220,"name":"pick_place","intro":"Pick and place demo sequence"}This creates a new file in flash with the given name and description.
Adding Steps
Section titled “Adding Steps”From JSON Command
Section titled “From JSON Command”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.
From Current Position
Section titled “From Current Position”Record the arm’s current position as a step (uses feedback data):
{"T":223,"name":"pick_place","spd":0.25}Add a Delay
Section titled “Add a Delay”Insert a timed pause between steps:
{"T":224,"name":"pick_place","delay":3000}The delay is in milliseconds.
Editing Steps
Section titled “Editing Steps”Insert at Position
Section titled “Insert at Position”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 a Step
Section titled “Replace a Step”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}Delete a Step
Section titled “Delete a Step”{"T":231,"name":"pick_place","stepNum":3}Reviewing a Mission
Section titled “Reviewing a Mission”View All Steps
Section titled “View All Steps”{"T":221,"name":"pick_place"}Returns the full content of the mission file, including all steps with their indices.
Move to a Specific Step
Section titled “Move to a Specific Step”Navigate the arm to a particular step’s position without playing the full sequence:
{"T":241,"name":"pick_place","stepNum":3}Playing a Mission
Section titled “Playing a Mission”Fixed Repeat Count
Section titled “Fixed Repeat Count”{"T":242,"name":"pick_place","times":3}Loop Forever
Section titled “Loop Forever”Set times to -1 for continuous playback:
{"T":242,"name":"pick_place","times":-1}Boot Mission
Section titled “Boot Mission”You can configure a mission to run automatically when the arm powers on:
Check current boot mission:
{"T":602}Clear boot mission:
{"T":603}Command Summary
Section titled “Command Summary”| T-Code | Command | Description |
|---|---|---|
| 220 | Create mission | New mission file with name and intro |
| 221 | View mission | Read all steps |
| 222 | Append JSON step | Add command string as step |
| 223 | Append feedback step | Record current position |
| 224 | Append delay | Add timed pause |
| 225 | Insert JSON step | Insert command at position |
| 226 | Insert feedback step | Insert current position at index |
| 227 | Insert delay | Insert pause at position |
| 228 | Replace with JSON | Overwrite step with command |
| 229 | Replace with feedback | Overwrite step with current position |
| 230 | Replace with delay | Overwrite step with pause |
| 231 | Delete step | Remove step at index |
| 241 | Move to step | Go to step position |
| 242 | Play mission | Execute with repeat count |
Mission system reference from firmware source json_cmd.h and Waveshare Wiki.