Remote Control Car Powered By Raspberry Pi Project – Raspberry Pi Endeavors

Update on the networking issues: I made a log of whenever my networking service had to be restarted, and it was very random – sometimes 12 times an hour, sometimes never in a night. In the end I got a new (not ancient) Edimax WiFi adapter, and this has been working great so far. I can also recommend this £10 Edimax one too. I also got a Logitech C910 webcam off eBay for £45 off eBay, which is much better than the ancient Microsoft one that I was using.

Pi with USB WiFi antenna, battery pack and webcam

Pi with USB WiFi antenna, battery pack and webcam

After buying some components off Maplin and Ebay, me and my housemate Nick have been able to light up LEDs and spin motors connected to a breadboard via first a header extension cable connected to some of the Pi’s GPIO pins, and then using the Adafruit Raspberry Pi Cobler – which transports all the pins functionality to a breadboard where you can start adding resistors, wires and LEDs easily.

We have been using ‘motion’ for Linux to export our webcam stream, however it wasn’t all that happy with higher resolution webcams, and froze very often for me, especially at night. Nick endured slightly better luck with a lower quality, older, Microsoft webcam, which froze less. We were prepared to settle with Motion, but then found that mjpg-streamer, that I had previously used at work to look at the current snowfall out of the window, provided a MUCH better quality, framerate, and hasn’t froze once yet.

I have made it start on boot by adding a new cron job that runs a shell scipt that contains the command to start mjpg streamer, and an ampersand to run it in the background:

Cron jon: @reboot /home/pi/Documents/code/

/home/pi/Documents/mjpg-streamer/mjpg-streamer/mjpg_streamer -i “/home/pi/Documents/mjpg-streamer/mjpg-streamer/ -n -f 25 -r 320×240″ -o “/home/pi/Documents/mjpg-streamer/mjpg-streamer/ -n -w “/home/pi/Documents/mjpg-streamer/mjpg-streamer/www” -p 8082″&

The mjpg-start command uses a definable resolution size, but be warned this is of set sizes, and an output port too – I have used 8082.

I followed this guide to get mjpg-streamer set up, be sure to run ‘make’ as sudo!

To get LEDs lighting up, I had a look at the Adafruit learning system, who have some brilliant guides from how to prepare and SD card with a Raspberry Pi image to how to make LEDs light up when you have a new Gmail message, to how to control a motor. Follow these great guides, grab a Raspberry Pi cobbler and breadboard and break out the old electronics and maths textbooks – be sure not to fry your Pi by putting too much power through it – be careful with the GPIO pins.

Happy Pi-ing!


One thought on “Remote Control Car Powered By Raspberry Pi Project – Raspberry Pi Endeavors”

Comments are closed.