Millis to MYS lamp
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user