diff --git a/MidRoomNLight/src/main.cpp b/MidRoomNLight/src/main.cpp index f2115fd..ffa79a2 100644 --- a/MidRoomNLight/src/main.cpp +++ b/MidRoomNLight/src/main.cpp @@ -12,6 +12,7 @@ //MyMessage msgLev(1, V_DIMMER); uint16_t lightLevel; bool lightOn = false; +MyMessage msgMillis(0, V_VAR1); void before() { @@ -26,12 +27,17 @@ void setup() void presentation() { // Send the sketch version information to the gateway and Controller - sendSketchInfo("Night Light", "2.0"); + sendSketchInfo("Night Light", "2.1"); present(0, S_DIMMER, "Dimmer"); } void loop() { + static uint32_t cRun = millis(); + if((cRun + 10000) < millis()){ + cRun = millis(); + send(msgMillis.set(cRun)); + } } void receive(const MyMessage &message)