diff --git a/src/main.cpp b/src/main.cpp index 4eab0ba..f0dece3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -10,6 +10,8 @@ LEDOutput _seatingLedOutput(0, true); LED _seatingLeds("seating", &_seatingLedOutput, FADE_IN_DURATION, FADE_OUT_DURATION); LEDOutput _kitchenLedOutput(1 , true); LED _kitchenLeds("kitchen", &_kitchenLedOutput, FADE_IN_DURATION, FADE_OUT_DURATION); +LEDOutput _bathroomLedOutput(2 , true); +LED _bathroomLeds("bathroom", &_bathroomLedOutput, FADE_IN_DURATION, FADE_OUT_DURATION); TimerManager _timers; JsonLightControl _jsonLightControl(&_timers); @@ -25,11 +27,15 @@ void setup() { _kitchenLedOutput.attach(18); _kitchenLedOutput.attach(23); + _bathroomLedOutput.attach(19); + _timers.add(_seatingLeds.getName(), [](){ _seatingLeds.off(); }); _timers.add(_kitchenLeds.getName(), [](){ _kitchenLeds.off(); }); + _timers.add(_bathroomLeds.getName(), [](){ _bathroomLeds.off(); }); _jsonLightControl.registerLEDs(&_seatingLeds); _jsonLightControl.registerLEDs(&_kitchenLeds); + _jsonLightControl.registerLEDs(&_bathroomLeds); _btService.init(); _btService.start(); @@ -39,4 +45,5 @@ void loop() { _timers.loop(); _seatingLeds.loop(); _kitchenLeds.loop(); + _bathroomLeds.loop(); }