1D Pong A two-player reaction game played on a single strip of WS2812B LEDs. Players compete by pressing their button at the right moment when the ball enters their zone. Features Fast-paced two-player gameplay Dynamic difficulty: zones shrink after each point Early-hit bonus: hit the ball as it enters your zone for extra speed 13 attract mode animations to draw players in Modular animation system for easy customization Visual feedback for hits, misses, and scoring Configurable game parameters Hardware Requirements Components Component Specification Quantity Microcontroller WEMOS D1 Mini ESP32 1 LED Strip WS2812B, 55 LEDs 1 Buttons Momentary push button 2 Power Supply 5V, 3A recommended 1 Wires Jumper wires As needed Schematic Download PDF Schematic Pin Connections Component ESP32 Pin LED Data GPIO 5 Left Button GPIO 17 Right Button GPIO 18 Left Button LED GPIO 25 (PWM) Right Button LED GPIO 26 (PWM) LED Power 5V LED Ground GND Buttons GND (active LOW with internal pull-up) Photos Installation Prerequisites Setup Clone the repository: git clone https://github.com/yourusername/1d-pong.git cd 1d-pong Open the project in VS Code: code . Build the project: Click the checkmark icon in the PlatformIO toolbar, or Press Ctrl+Alt+B Upload to your ESP32: Connect your ESP32 via USB Click the arrow icon in the PlatformIO toolbar, or Press Ctrl+Alt+U Configuration Edit include/config.h to customize: // Hardware # define NUM_LEDS 55 // Number of LEDs in your strip # define LED_PIN 5 // Data pin for LED strip # define BUTTON_LEFT_PIN 17 // Left player button # define BUTTON_RIGHT_PIN 18 // Right player button // Button LEDs (PWM capable pins) # define BUTTON_LED_LEFT_PIN 25 // Left button LED # define BUTTON_LED_RIGHT_PIN 26 // Right button LED # define BUTTON_LED_PWM_FREQ 5000 // 5kHz PWM frequency # define BUTTON_LED_PWM_RES 8 // 8-bit resolution (0-255) // Game Parameters # define ZONE_SIZE_START 10 // Initial zone size (LEDs) # define ZONE_SIZE_MIN 5 // Minimum zone size # def...
First seen: 2026-01-14 06:08
Last seen: 2026-01-14 09:09