/* * HeisserDraht - ESP32-C3 Buzz Wire Game * * Hardware: * - ESP32-C3 (RISC-V) * - 16x WS2812B LEDs on GPIO 8 * - SSD1306 128x64 OLED on I2C (SDA=4, SCL=5) * - Wire touch sensor on GPIO 2 (INPUT_PULLUP, touch = GND) * - Start button on GPIO 3 (INPUT_PULLUP, press = GND) * - Optional passive buzzer on GPIO 10 * * Game flow: IDLE → COUNTDOWN → PLAYING → GAME_OVER → IDLE */ #include "config.h" #include "game_logic.h" #include "led_effects.h" #include "display.h" void setup() { Serial.begin(115200); delay(500); Serial.println(); Serial.println("=== HEISSER DRAHT " VERSION_STR " ==="); Serial.println("[INIT] Starting..."); // Initialize subsystems gameInit(); Serial.println("[INIT] Game logic OK"); ledsInit(); Serial.println("[INIT] LEDs OK"); displayInit(); Serial.println("[INIT] Display OK"); Serial.println("[INIT] Ready! Press START to begin."); } void loop() { // Check inputs gameCheckStartButton(); gameCheckTouch(); // Update game state gameUpdate(); // Update outputs ledsUpdate(); displayUpdate(); // Small delay for watchdog delay(LOOP_DELAY_MS); }