- An eletric race track. I used Carrera- Supercharger but you can use any race track you want. Just make sure the cars are large enough to place the sensors
- ELEGOO electronic Kit, it contains all the electronic components required
- A Raspberry Pi 3 or higher. I choose the official Raspberry Pi 3 (16 Go) starter kit
- Basic electronic tools. I used soldering tin and electric cables salvaged from an old printer.
The initial version was made on the Breadboard included in the ELEGOO kit
For details have a look at the Fritzing file
To make it more robust, compact and transportable, you can build a hat for your Raspberry Pi that will fit in the Raspberry Pi case. You can also connect your buzzer to an NPN transistor and a potentiometer to control volume and make it louder.
Simply create holes in the case for the LEDs and connexion cable
For details have a look at the Fritzing file
The Raspberry pi is running Raspbian. To conserve resources, I disabled the gui and ennabled ssh. You can follow this guide.
Copy the content of ./code/*
on the Raspberry and add exec mod to start.sh
sudo chmod +x start.sh
- Turn on the Raspberry Pi
- Execute the
start.sh
script on the Raspberry Pi
The physical buttons allow you to start a new race, stop a none finished race and reset a race. If the start button is pressed again, a new race is started.