Extended version of the OpenledRace version "Basic for PCB Rome Edition. 2 Player, without Boxes Track".
Also available as OpenLedRace example in the NeoPatterns library.
- Input from MPU6050 Accelerometer.
- Classes for Car, Bridge, Ramp and Loop with natural gravity.
- Light effects by NeoPattern library.
- Tone generation without dropouts by use of hardware timer output.
- 2004 LCD for instructions and leap counter.
- Input feedback by an 8 pixel Neopixel bar.
- Winner melody by PlayRTTTL library.
- Compensation for blocked millis() timer during draw.
- Checks for RAM availability.
- Overlapping of cars is handled by using addPixelColor() for drawing.
- Development mode, where Gravity, Friction and Drag can be set by potentiomenters.
With every button press or every acceleration of the dumbbells you add a fixed amount of energy to the "car".
This energy is used to increase speed.
Formula is: NewSpeed = sqrt((OldSpeed * OldSpeed) + AdditionalEnergy)
On the other hand, energy is consumed by friction and drag.
Gravity also increases or decreases the car as in real life.
Formula is: NewSpeed = OldSpeed + Gravity + Friction + (OldSpeed * Drag)
At the Hannover MakerFaire 2022 | At the Cologne public library MINTköln-Festival 2021 |
---|---|
At the Hannover MakerFaire 2022 | At the Cologne public library MINTköln-Festival 2021 |
---|---|
Download and extract the repository. In the Arduino IDE open the sketch with File -> Open... and select the OpenledRace folder.
You need to install Adafruit NeoPixel library under "Tools -> Manage Libraries..." or "Ctrl+Shift+I" -> use "neoPixel" as filter string.
You also need to install NeoPatterns and PlayRtttl library under "Tools -> Manage Libraries..." or "Ctrl+Shift+I"
- Breadboard
- Jumper wire
- Pin header to connect cables to breadboard
- Arduino Nano
- WS2812 strip 5m 60 IP30 - 60 pixel per meter
- 10 kOhm resistor for WS2812 strip data input
- 2 Arcade pushuttons + 2x2 meter 2-wire cable
- 2 Handlebar ends with foam grips to mount the pushuttons
- 2004 LCD with serial I2C interface adapter
- Speaker > 32 Ω
- 4.7 µF capacitor for speaker
- Power supply - e.g. a 18650 battery + holder
- 1k potentiometer for volume control
- "Reset Game" Pushbutton for breadboard
- 2 8xWS2812 bars + 2 10kOhm resistors for optical input feedback
- 2 GY-521 MPU6050 accelerometer Breakout boards (+ 2 Blink LEDs)
- 2x2 meter 4-Wire cable (+ 2x2 10 kOhm I2C pullup resistors) to connect the accelerometers
- 2 Dumbbells, each 1 kg
- 3 100k potentiometers for setting of Gravity, Friction and Drag.
Pin layout is defined here
Breadboard overview | Accelerometer connection |
---|---|
Breadboard top view | Breadboard front view |