Hi gunner so this is my sketch. It’s basically the Nodemcu connected to a ultrasonic sensor which reads the level in a bank and projects it onto an Lcd screen as well as the blynk app. I also made it to be able to start automatically when the level goes to a preset value and stop when it’s filled up.
In what way? No compile. Runs, but no display. Display, but incorrect result. Etc…
Break it down step by step… look at what does work, use comments and serial prints to monitor code progress, find the parts that don’t work and slowly work you way through them looking for syntax or logic errors, etc.
I try to help people understand how Blynk works, not troubleshoot their code. Honestly, I have a hard enough time troubleshooting my own code…
Of course it doesn’t work, you forgot to run every minute your “runEveryMinute” function…
Just add this line inside of setup function:
timer.setInterval(60000L, runEveryMinute);
where 60000L is 60 seconds
Simple timer is very simple, just define a function (runEveryMinute) set it run every minute (timer.setInterval) and call it on loop (timer.run) that’s all!
Thanks darkmoon that was it… I missed that… Should’ve checked the code more before posting… One question the readings stop displaying when the wifi signal is off… Shouldn’t it continue to read and display on the lcd??
Not the way you have it set up… search this forum for the many topics about keeping the sketch running when no internet, no WiFi, disconnected from Blynk etc. and look at eh Connection management options.