The browser UI and the simulator bridge exchange JSON messages over WebSocket.
{"cmd":"move","action":"forward"}Supported actions:
- forward
- left
- right
- uturn
{"cmd":"set","r":3,"c":2,"dir":"E"}{"cmd":"walls","walls":[[0,0,1,1,1,1],[0,1,1,0,1,1]]}{
"type":"state",
"bot":{"r":2,"c":3,"dir":"N"},
"start":[0,0],
"goal":[4,4],
"walls":[[0,0,1,1,1,1], [0,1,1,0,1,1]]
}- The walls array uses the format [row, col, north, east, south, west].
- The UI sends state updates whenever the maze or bot position changes.
- The bridge script translates incoming state updates into UART-like packets for the STM-side workflow.