Skip to content

itzzhashtag/1D-Strip-Racer

Repository files navigation

๐ŸŽ๏ธ 1D-LED Strip Racing

A Fast-Paced DIY Arduino Racing Game

by Aniket Chowdhury (aka #Hashtag)


๐ŸŽฌ Project Overview

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!


โœจ Highlights

  • ๐ŸŽ๏ธ 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)

โš™๏ธ How It Works

Button Press
     โ†“
Speed Increase (ACCEL)
     โ†“
Friction Applied Over Time
     โ†“
Distance Calculation
     โ†“
LED Position Update
     โ†“
Lap Detection โ†’ Display Update โ†’ Sound Feedback

๐Ÿง  Core Concept

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

๐Ÿ”ง Hardware

Basic Setup (Arduino Uno)

  • Arduino Uno / compatible board
  • WS2812B LED Strip
  • TM1637 4-digit display
  • Push buttons (ร—2โ€“4)
  • Passive buzzer
  • External 5V power supply

๐Ÿ”Œ Wiring Overview

Component Arduino Pin
LED Strip Data D6
Buzzer D8
Player 1 Button D2
Player 2 Button D3
TM1637 CLK D10
TM1637 DIO D11

โš ๏ธ LED strip must use external 5V power


๐ŸŽฎ Game Flow

  1. ๐ŸŒˆ Idle (rainbow animation)
  2. โณ Countdown (3 โ†’ 2 โ†’ 1 โ†’ GO)
  3. ๐ŸŽ๏ธ Racing (button mashing)
  4. ๐Ÿ† Winner animation
  5. ๐Ÿ” Back to idle

๐Ÿงช Variations

๐Ÿงฉ Arduino Mega (4 Players)

  • More buttons
  • More LEDs
  • Multiplayer chaos ๐Ÿ˜„

๐Ÿ“ก ESP32 Wireless Version

  • Bluetooth / WiFi input
  • Phone-based controls

โšก Turbo Mode

  • Higher acceleration
  • More friction
  • Faster gameplay

๐ŸŽจ Visual System

Effect Meaning
๐ŸŒˆ Rainbow Idle
๐Ÿ”ด๐ŸŸ ๐ŸŸข Sweep Countdown
โšช Flash GO
๐Ÿ”ด / ๐Ÿ”ต Dots Players
๐ŸŸข Flash Winner

๐Ÿ›  Code Concepts

This project teaches:

  • Variables & constants (#define)
  • State machines (enum)
  • Data structures (struct)
  • Physics simulation
  • Real-time loops

๐Ÿš€ Future Improvements

  • ๐Ÿ“ฑ Mobile app control
  • ๐ŸŒ Web dashboard (ESP32)
  • ๐Ÿค– AI opponent
  • ๐Ÿง  Smarter physics
  • ๐Ÿ† Leaderboards

๐Ÿ“ธ Simulation

image . image

๐Ÿ“ธ Wiring & Schematic

image . image

๐Ÿ‘ค Author & Contact

๐Ÿ‘จ Name: Aniket Chowdhury (aka Hashtag)
๐Ÿ“ง Email: micro.aniket@gmail.com
๐Ÿ’ผ LinkedIn: itzz-hashtag
๐Ÿ™ GitHub: itzzhashtag
๐Ÿ“ธ Instagram: @itzz_hashtag


โญ Support

If you like this project:

  • โญ Star the repo
  • ๐Ÿด Fork it
  • ๐Ÿ”ง Build your own version

๐Ÿ”ฅ Final Thought

This is not just a game โ€” itโ€™s a hands-on introduction to physics, electronics, and fun.

About

๐ŸŽฎ 1D-LED Strip Racing is a fun, competitive button-mashing racing game built using microcontrollers and addressable LEDs.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages