From eacb06c0ae6786f4a34e4b023cbdb4d7947b6ac5 Mon Sep 17 00:00:00 2001 From: Robert Marshall Date: Sun, 22 Aug 2021 20:08:04 +0100 Subject: [PATCH] Add inputs for controlling all lights --- src/BluetoothLEDCallback.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/BluetoothLEDCallback.cpp b/src/BluetoothLEDCallback.cpp index ec84433..0b8a495 100644 --- a/src/BluetoothLEDCallback.cpp +++ b/src/BluetoothLEDCallback.cpp @@ -8,6 +8,14 @@ class BluetoothLEDCallback : public BLECharacteristicCallbacks { std::string value = characteristic->getValue(); if (value.length() > 0) { Serial.println(value.c_str()); + if (value == "all on"){ + _seatingLeds->on(); + _kitchenLeds->on(); + } + if (value == "all off"){ + _seatingLeds->off(); + _kitchenLeds->off(); + } if (value == "seating on") _seatingLeds->on(); if (value == "kitchen on")