Raspberry Pi Endeavors 6 – Power!

Having only 6 AA batteries for the 4 motors wasn’t enough, and even with my super friction-reducing sellotape, the car struggled to turn on the spot, with 1 or 2 engines ┬ánormally stalling. A maximum of 9v was being provided for the 4 6v motors (connected in parallel), resulting in around 2 volts per motor (max) at a quick guess. I grabbed an 8 battery holder from Maplin, hooked this up and the car is much happier now – can turn on the spot well, and goes a bit faster too.

Hazard Lights on

Pi Car 01 with hazard warning lights flashing

As well as my emergency lighting system (ELS), I made a tiny script to simulate hazard warning lights, for when the car is just pulled over at the side of a room. The interface to control the vehicle is very simple – yet functional! When time allows, I will break out the CSS and get it looking a bit fancier.

Pi Car 01 Interface

Pi Car 01 Interface including view from the onboard camera looking out of its garage at the parking marks (sellotape on the floor) and a captivated audience

The two fields at the bottom show the JavaScript and the driving shell script reporting the key down (e.g LEFT), and the key up (all off). This is helpful for diagnosing issues such as when the off instruction arrives before the on one, and so the car starts driving and doesn’t stop. This may be fixable by getting the page to constantly tell the Pi that ‘up’ is held down, and then if the Pi notices an absence of these instructions, it will know to stop.