And I’ve said that it I were in your situation I would use a device that had native WiFi connectivity, to eliminate some of these potential problem areas.
If the problem persists with a NodeMCU or ESP32 then you have a better idea of where the problem may lie.
However, you seem reluctant to want to do that, and instead you’re focusing on areas that won’t have anything to do with your ussue.
So, while waiting for ESP32 to arrive, is there any settings needed in router to get it to work? I have a D-LINK 920, cheap mobile broadband router. I have forwarded some ports on it before, when trying to reach it remotely. But when using Blynk I have assumed that no port forwarding or other simlar settings will be needed.
Hi,
It turned out to be some issue with the router, probably I had old configurations still around. After reconfiguring it my application has run for weeks without any issues. So that’s good and I appreciate all help.
I will now add counting of pulses coming into the Arduino. They are reflecting energy consumption and will show up every 2-3 seconds in average and be at least 30 ms in duration. My first thought was to use the AVR external interrupt and just increase the counter. But then I became a bit unsure if such “frequent” interrupts will disturb Blynk operation.
One alternative would be to add Blynk timer every 20ms and check the state of the pin. What would the best solution frm Blynk perspective?
Using interrupts would be better.
You should probably use a timer to do some calculations on the number of pulses received during the elapsed time and push the results to Blynk and reset your pulse counter.
If you do this then using noInterrupts() and Interrupts() at the beginning and end of this calculation code is a good idea.
If you’re attempting to calculate something like Watt Hours then it makes the maths easier if you use a timer that runs every 36 seconds, as that’s 100th of an hour.