#include <Arduino.h>
#include "Game.h"
#include "Moodlight.h"
// === Global objects ===
Sound sound;
Moodlight moodlight(&sound);
Strip strip(&moodlight);
Controller controller(&moodlight, 2, Signal::BA, 3, Signal::BB, 4, Signal::BC);
void setup() {
Serial.begin(115200);
Serial.println("Moodlight - Relaxing ambient light");
Serial.println("Buttons:");
Serial.println(" A (pin 2) - Increase speed");
Serial.println(" B (pin 3) - Decrease speed");
Serial.println(" C (pin 4) - Reset speed");
strip.begin();
moodlight.startLevel();
}
void loop() {
// Update moodlight animation
moodlight.loop();
// Read buttons and trigger callbacks
controller.loop();
// Update LED strip
strip.update();
// Small delay for stability
delay(10);
}