For my program I use a counter that counts a button’s presses. The only issues is that it takes severeal seconds for the count to update.
Did anyone manage to solve this issue?
I’ve never had this kind of problem. What does your program look like?
The same program as I’ve attached here:DHT22 ERR - Arduino Mega
You are doing a LOT of calculations each time GPS updates, and you are requesting GPS updates as fast as you can (plus GPS updates require serial communication that is likely grabbing control of CPU, and that is over-lapping with attempts to pull data from dht22).
One option that might help with DHT22 sensor problems is to link gpsdata-DONE to dht2x-hygrometer-UPD so dht22 only updates after GPS communication has completed. Since dht2x node doesn’t have a done output, you can add a delay node after gpsdata-DONE, then trigger next update of gpsdata with delay-DONE. This probably still won’t recognize button push while gpsdata is running, but it frees the CPU to handle other tasks in between gpsdata runs.
Thanks for the help!
Adding delay node for gpsdata does help speeding things up regarding button press recognision!
No luck with DHT 22 though.
Not even if you sequence them by having gpsdata-DONE trigger dht2x-UPD?
Nope. But I connected it to a different board and once in a few seconds it shows ERR for a moment. That board doesnt do nothing but reading the DHT and transmitting it with 433Mhz transmitter.
I thing on the Mega I have to find the sweet spot of seconds that will make it work.