You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After connecting the robot circuit as shown below (2. ESP32 Robot Car Circuit) and uploading ros_bridge_esp32.zip, the ESP32 robot car can be controlled using serial commands.
Note: For basic stundying, you can see the attached document “week4-5 esp32 robot car.pdf”. in this document, the connection is very simple for student learning. It is different from "ros_bridge_esp32.zip" that is latest version.
1) Motor movement
Serial Monitor Output
Action
Command
Move Forward
o 255 255
Turn Left
o -255 255
Turn Right
o 255 -255
Move Backward
o -255 -255
Stop
o 0 0
2) Encoder values
Serial Monitor Output
Action
Command
Read the two encoder values
e
(No output image)
Reset the two encoder values
r
3) Servo motors
Serial Monitor Output
Action
Servo 0 rotate 45 degrees
Servo 1 rotate 125 degrees
4) Digital Pinout High/Low
Serial Monitor Output
Action
Command
Set Pin 2 HIGH (LED ON)
l 2 1
Set Pin 2 LOW (LED OFF)
l 2 0
2. ESP32 robot car circuit
This circuit supports the following connections: (1) two 12 V motor encoders (77 RPM or similar), (2) three SG90 servo motors (adjustable), and (3) a relay switch.
About
This code with Arduino IDE that controls a ESP32 by serial commands such as, "o 255 255" forward, "s 1 45"" server1 rotate 45 degree