Closed zjc2106 closed 6 months ago
I updated the code to use a simple JSON object when sending commands from the server to the tank. I used the ArduinoJSON library (https://arduinojson.org) to serialize and deserialize JSON messages. Also used this repository for example code: https://github.com/techiesms/ESPNOW-JSON
Example JSON object that is sent from server to tank: { "direction": "f", "value": "100" }
"direction" can be "f", "b", "r", or "l" (forward, backward, right, or left) "value" can be any number (degrees for right and left, distance for forward and backward)
Stuff to discuss next meeting:
Shoutout to Brennen- the ESP-NOW code that he wrote worked great
See commit 1a35ec2
[X] Determine JSON format to send to/from tanks [X] Determine what messages line up with specific movement functions