sendHeartbeat not work right
Troubleshooting
6
Posts
2
Posters
790
Views
4
Watching
-
I send Heartbeat, but receive in system I_DISCOVER_RESPONSE
Sketch code
void loop() { unsigned long tick = millis(); if (tick - previsionTime > HeartBitInterval) { previsionTime = tick; sendHeartbeat(); } }Node log
__ __ ____ | \/ |_ _/ ___| ___ _ __ ___ ___ _ __ ___ | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __| | | | | |_| |___| | __/ | | \__ \ _ | | \__ \ |_| |_|\__, |____/ \___|_| |_|___/\___/|_| |___/ |___/ 2.3.0 16 MCO:BGN:INIT NODE,CP=RNNNA---,VER=2.3.0 ... 14960 TSF:MSG:SEND,115-115-0-0,s=2,c=1,t=2,pt=1,l=1,sg=0,ft=0,st=OK:1 48934 TSF:MSG:READ,0-0-255,s=255,c=3,t=20,pt=0,l=0,sg=0: 48941 TSF:MSG:BC 49762 TSF:MSG:SEND,115-115-0-0,s=255,c=3,t=21,pt=1,l=1,sg=0,ft=0,st=OK:0 49772 TSF:MSG:READ,0-5-255,s=255,c=3,t=20,pt=0,l=0,sg=0: 49780 TSF:MSG:BC 49782 TSF:MSG:READ,0-6-255,s=255,c=3,t=20,pt=0,l=0,sg=0: 49788 TSF:MSG:BC 1254332 TSF:MSG:READ,0-0-255,s=255,c=3,t=20,pt=0,l=0,sg=0: 1254340 TSF:MSG:BC 1255313 TSF:MSG:SEND,115-115-0-0,s=255,c=3,t=21,pt=1,l=1,sg=0,ft=0,st=OK:0 1255323 TSF:MSG:READ,0-5-255,s=255,c=3,t=20,pt=0,l=0,sg=0: 1255331 TSF:MSG:BCLog in system: MajorDomo
2018-11-29 10:26:19 699 >> 3:Internal; Gate:1; Node:115; Sensor:255; Ack:0; Sub:21:I_DISCOVER_RESPONSE; Msg:0 2018-11-29 10:25:47 133 >> 1:Set; Gate:1; Node:115; Sensor:2; Ack:0; Sub:2:V_STATUS; Msg:1 ... -
This is only part of the code.
Full version sketch
https://github.com/Shagrat2/MSMDLed/blob/master/MSMDLed.ino -
This is only part of the code.
Full version sketch
https://github.com/Shagrat2/MSMDLed/blob/master/MSMDLed.ino@ivan-z Wow, looks great!
Nevertheless make sure, loop() is effectively entered.
So first step for debugging might be to add aSerial.println("Entering - before()");at the beginning of the corresponding subroutine (do this for before(), presentation() and setup() and at the end of setup(), I'd recommend an additional Serial.println("exiting setup()";.
-
before = work
presentation = work
setup = work???