Add inputs for controlling all lights
This commit is contained in:
parent
a4ab81cf4d
commit
eacb06c0ae
1 changed files with 8 additions and 0 deletions
|
@ -8,6 +8,14 @@ class BluetoothLEDCallback : public BLECharacteristicCallbacks {
|
||||||
std::string value = characteristic->getValue();
|
std::string value = characteristic->getValue();
|
||||||
if (value.length() > 0) {
|
if (value.length() > 0) {
|
||||||
Serial.println(value.c_str());
|
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")
|
if (value == "seating on")
|
||||||
_seatingLeds->on();
|
_seatingLeds->on();
|
||||||
if (value == "kitchen on")
|
if (value == "kitchen on")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue