BH1750 library issue with using sleep
-
I seem to have a problem with receiving ACK when using the sleep_time function in the example sketch for the BH1750FVI. Every time I leave the sleep function in the sketch, I end up only getting one value report with ACK during the presentation. After that within the loop, and watching the serial monitor, the values are no longer reported and I keep getting ST=NACK all the time. The only way so far for me to get the sketch working correctly, is if I use the wait function and remove the sleep function from the sketch. Has anyone else had this problem and if so, know of a way to resolve this?
-
@rayne are you using nrf24? If that’s the case, the solution is probably https://forum.mysensors.org/post/92971 / https://github.com/mysensors/MySensors/pull/1193
-
@Rayne
Can you upload your code. Two days ago I built a battery powered node with BH1750 and don't have any problem.
MySensors version?
Running on a Arduino Nano?
Battery powered?
Serial/Ethernet GW?
-
@mfalkvidd yes, I am. So the solution is to load 2.3.1 beta in order to avoid sleeping too fast for the radio to send, receive, ack, settle so to speak?
-
@rayne exactly
-
@mfalkvidd Thanks for the advice and I went and downloaded the Mysensors 2.3.1 beta with @tekka 's latest patch. However I will have to report back later how that went after updating the gateway and nodes with the new version. I'm suffering from a human bug right for the past couple of days. Gotta get over this. I have a good feeling this will resolve any issues with sleeping the radios. Thanks again to @mfalkvidd and @tekka for this should anyone find themselves in this particular situation.