Note
Hello, welcome to the SunFounder Raspberry Pi & Arduino & ESP32 Enthusiasts Community on Facebook! Dive deeper into Raspberry Pi, Arduino, and ESP32 with fellow enthusiasts.
Why Join?
Expert Support: Solve post-sale issues and technical challenges with help from our community and team.
Learn & Share: Exchange tips and tutorials to enhance your skills.
Exclusive Previews: Get early access to new product announcements and sneak peeks.
Special Discounts: Enjoy exclusive discounts on our newest products.
Festive Promotions and Giveaways: Take part in giveaways and holiday promotions.
👉 Ready to explore and create with us? Click [here] and join today!
8. Move Field Centric¶
This project is based on the previous project to combine the compass function to the movement of Zeus Car. While you control the Zeus Car movement with the remote control, if it is deflected by an external force (e.g. kicked by a dog), it will automatically deflect back to the original direction.
How to do?
The ESP32-CAM and the Arduino board share the same RX (receive) and TX (transmit) pins. So, when you’re uploading code, you’ll need to first disconnect the ESP32-CAM to avoid any conflicts or potential issues.
Open the
8_move_field_centric.ino
file under the path ofzeus-car-main\examples\8_move_field_centric
.After the code is uploaded successfully, slide the power switch to ON to start the Zeus Car.
Then use the number 1 ~ 9 on the remote control to control the car in 8 directions. After pressing a key, the Zeus Car will keep moving until you press or the number key 5.
When you press once, the car will rotate counterclockwise with the body as the center and will stop until you press or the number key 5.
Similarly, pressing once will make the car rotate clockwise, and then it will stop until you press or the number key 5.
Press the key, the car will drift to the left.
Press the key, the car will drift to the right.