sendHeartbeat not work right
-
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:BC
Log 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 ...
-
@ivan-z said in sendHeartbeat not work right:
Not quite sure, but imo the node doesn't enter loop() at all. Sure it is registered to the controller?
You may add some serial output when loop() is processed the first time (or use setup() routine)
-
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???
-
Is setup() also exiting correctly or only entering?
If all this happens, add a one-time routine in loop().
Suggested Topics
-
Day 1 - Status report
Announcements • 23 Mar 2014, 22:45 • hek 24 Mar 2014, 20:12 -
Ghost Child
Troubleshooting • 15 days ago • FcNanoLed 11 days ago -
Getting system time from the controller
Troubleshooting • 27 Feb 2025, 01:39 • dpcons 27 days ago -
JSN-SR04T-V3.0 Coax cable extended
Troubleshooting • 10 days ago • bocalexandru 8 days ago -
Forum Search not working?
Troubleshooting • 4 Oct 2023, 23:33 • Gibber 2 Sept 2024, 20:28 -
NODs stop responding, but ping works.
Troubleshooting • 21 days ago • Marcin 21 days ago