DIY Led Racing Game (Open Led Race)

by mircemk in Circuits > Arduino

619 Views, 5 Favorites, 0 Comments

DIY Led Racing Game (Open Led Race)

naslovM2 Cropped.jpg

OpenLedRace is a game that uses an addressable LED strip as a track where cars are represented as lights.

Description

DIY Led Racing Game (Open Led Race)

This is a simple 1D Led race game which is known as the open LED race. So, OpenLedRace is a game that uses an addressable LED strip as a track where cars are represented as lights. It is created by Gerardo Barbarov Rostan and is an open-source project, so the code is constantly improving.
This time I present you a compact version of this game so that the track is linear and contains only 60 LEDs. The advantage of this design is that the device is portable and everything is put into operation in a few seconds.

Parts

Untitled.jpg

The device is very simple and easy to make and consist of only a few components:

- Arduino Nano microcontroller

- WS2812 Led strip with 60 LEDs

- 2 buttons

- Buzzer

- Transistor

- and resistor

Instructions, Schematic and Code

Untitled Sketch_bb.jpg
DSCN3159.JPG
DSCN3162.JPG
DSCN3170.JPG
DSCN3173.JPG
DSCN3174.JPG
DSCN3175.JPG

In the basic game mode, where the speed of the car is proportional to the pulsations of the control button, and in the ascent, ramps must be pressed more quickly to compensate for the effect of simulated gravity. One car is presented in RED and the other in GREEN. In the beginning, each car is represented by two LEDs, and each complete turn is increased by one led. An interesting effect is an inertia. After we stop pressing the button, the car continues to move for some time. The speed of movement of the cars as a function of the frequency of pressing the button can be easily adjusted in the code. Other interesting effects are the addition of sound that simulates the engine and the simulation of the ascent on the road. Effects are activated by holding down both keys while the device is turned on. At the end of the race, the first few LEDs glow with the color of the winning car.

Finally, the assembly is installed in a suitable box made of PVC material and coated with a self-adhesive label.

Downloads