Arduino Wifi Remote Controlled Car
I wanted a remote control car that I could control via WiFI, in case I wanted to program it to do stuff over the network. I couldn’t find a commercial product I liked that did this in August 2022, so I made this.
This car was built to be controlled via this controller. However, the control architecture was built to be generic, so it could support different types of controllers. I wanted the ability to record commands sent to it via Joystick, and then replay them so I could program routes or patterns of movement for the vehicle in an intuitive way. The ability to program another Arduino to act as a controller to send a series of commands for fixed routes by the press of a button or on a timer was also desired.
Lessons Learned the Hard Way:
- The plastic cover of the car had a surprisingly powerful effect on connection reliability. The maximum reliable range appeared to be only 5 meters/16 feet, even with a direct line of sight to the router.
- Arduino Uno WiFi Rev 2 does not offer good support for external antennas.
- To get a better reliable range it was necessary to completely refactor the design to something that offered good support for external antennas.
- It would have been wise to read the specs for my motor controller more carefully, which also offered encoder support. This was unfortunately not realized until after I wrote code to use the encoder shield.
- It would have been smarter to use a differential steering library instead of writing this functionality myself. I didn’t do it because it was easy, I did it because I thought it would be easy when I started.