1D RGB LED Strip Racing is a fun, competitive button-mashing racing game built using microcontrollers and addressable LEDs.
Each player controls a โcarโ represented by a glowing LED. The faster you press your button, the faster your car moves.
๐ First to complete all laps wins!
-
๐๏ธ Real-time LED racing simulation
-
โก Physics-based movement (acceleration + friction)
-
๐ฎ Supports 2 to 4 players
-
๐ข Live lap counter using 7-segment display
-
๐ต Sound effects (countdown, lap, win, defeat)
-
๐ Smooth animations (idle, countdown, win)
-
๐ Multiple hardware versions:
- Arduino Uno (basic)
- Arduino Mega (4 players)
- ESP32 (wireless control)
Button Press
โ
Speed Increase (ACCEL)
โ
Friction Applied Over Time
โ
Distance Calculation
โ
LED Position Update
โ
Lap Detection โ Display Update โ Sound Feedback
This is not just blinking LEDs โ it's a mini physics engine.
Each player has:
- Speed
- Distance
- Lap count
The system simulates motion using simple physics:
- Acceleration when pressing
- Gradual slowdown when not
- Arduino Uno / compatible board
- WS2812B LED Strip
- TM1637 4-digit display
- Push buttons (ร2โ4)
- Passive buzzer
- External 5V power supply
| Component | Arduino Pin |
|---|---|
| LED Strip Data | D6 |
| Buzzer | D8 |
| Player 1 Button | D2 |
| Player 2 Button | D3 |
| TM1637 CLK | D10 |
| TM1637 DIO | D11 |
- ๐ Idle (rainbow animation)
- โณ Countdown (3 โ 2 โ 1 โ GO)
- ๐๏ธ Racing (button mashing)
- ๐ Winner animation
- ๐ Back to idle
- More buttons
- More LEDs
- Multiplayer chaos ๐
- Bluetooth / WiFi input
- Phone-based controls
- Higher acceleration
- More friction
- Faster gameplay
| Effect | Meaning |
|---|---|
| ๐ Rainbow | Idle |
| ๐ด๐ ๐ข Sweep | Countdown |
| โช Flash | GO |
| ๐ด / ๐ต Dots | Players |
| ๐ข Flash | Winner |
This project teaches:
- Variables & constants (
#define) - State machines (
enum) - Data structures (
struct) - Physics simulation
- Real-time loops
- ๐ฑ Mobile app control
- ๐ Web dashboard (ESP32)
- ๐ค AI opponent
- ๐ง Smarter physics
- ๐ Leaderboards
.
.
๐จ Name: Aniket Chowdhury (aka Hashtag)
๐ง Email: micro.aniket@gmail.com
๐ผ LinkedIn: itzz-hashtag
๐ GitHub: itzzhashtag
๐ธ Instagram: @itzz_hashtag
If you like this project:
- โญ Star the repo
- ๐ด Fork it
- ๐ง Build your own version
This is not just a game โ itโs a hands-on introduction to physics, electronics, and fun.