Indeed it looks like the same problem.
Thank you!
Indeed it looks like the same problem.
Thank you!
Indeed it looks like the same problem.
Thank you!
Hello,
First mysensors build here,
I set up a Wemos D1 mini + nrf24 gateway and an Arduino Uno + nrf24 node, its only a test setup. Both use a 47uf capacitor between radio vcc and gnd.
On the gateway Im using ESP8266 Ethernet gateway, On the arduino Im using the motion sensor sketch.
Presentation of the node looks fine, so it seems communication is ok.
I tried for a few hours to send a message to gateway and it was giving error all the time
!TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=NACK:0
no acknowledge it seems.
After hours of fiddling discovered if I send the message twice, the first time fails but the second is sent and received by the gateway ok.
45351 !TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=NACK:0
45360 TSF:MSG:SEND,1-1-0-0,s=1,c=1,t=16,pt=0,l=1,sg=0,ft=1,st=OK:0
It is totally consistent so I can reliably send messages but I dont know why I have to send the messages twice
void loop()
{
// Read digital motion value
bool tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH;
Serial.println(tripped);
send(msg.set(tripped?"1":"0")); // Send tripped value to gw
send(msg.set(tripped?"1":"0")); // Send tripped value to gw <----------Second time ¿?
// Sleep until interrupt comes in on motion sensor. Send update every two minute.
sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), CHANGE, SLEEP_TIME);
}
Any idea why is this happening?