mirror of
https://github.com/usatiuk/door-thing.git
synced 2025-10-26 03:07:49 +01:00
set correct value on connect
This commit is contained in:
@@ -58,6 +58,8 @@ void loop()
|
||||
|
||||
// while the central is still connected to peripheral:
|
||||
bool oldState = digitalRead(SWITCH_PIN);
|
||||
switchCharacteristic.writeValue(oldState);
|
||||
|
||||
while (central.connected())
|
||||
{
|
||||
// read the switch state:
|
||||
|
||||
Reference in New Issue
Block a user