RC Car Controlled From Anywhere
Overview
My first working electronics project, built in spring 2022 in my high school's Robotics and Automation shop. A Parallax RC car frame (I couldn't 3D print my own yet), a Raspberry Pi 3 on top, a camera, two continuous-rotation servos for tank steering and a USB battery pack. A Node.js and Express web server on the Pi drove the servos from WASD keys in a browser and streamed the camera back, and ngrok tunneled it to the public internet, so no port forwarding and no static IP. A friend in the UK drove it live from about 3,000 miles away. It impressed my teacher, and it's the project everything after it came from.
Photo gallery
What I learned
- I lost the code. Poor documentation at the time, and the Pi's SD card was the only copy. Every project since has a repo from the first commit, and the first thing I did at Circuit Wizardry was put the firmware on GitHub.
- A tunnel beats a router. I'd assumed internet control meant port forwarding and a static IP. ngrok on the Pi gave a public URL in one command. The hard part of a connected device is usually the network, and it's worth checking whether someone has already solved it.
- Web servers and sockets were the real lesson. The car was servos and a camera. What I'd actually learned by the end was how a browser talks to a server and how a server talks to hardware, which is the same thing MissionControl does a year later.