Esp8266 wdt as timer5/1/2023 ![]() ![]() You need to use one of the many ways (as always) to count time for your measuring task whilst still servicing these other code components.Īrduino tend to use Millis() a millisecond counter and and you check the difference to see if the time is up to run your loop. So other components like WiFi and watchdog do not get serviced. The problem with Delay() is that whilst it is running the delay code it will not do anything else. I keep reading references to ESP2866 being influenced badly by over use of Delay() but don’t seem to be able find a definitive statement about what constitutes a problem and how to deal with it.Īny input on this subject would be welcome. If the PC doesn’t receive a reading when it expects one or if the Arduino doesn’t receive an ACK, each restarts) (The VB running on the PC, sends an ACK message when it receives a reading. When it restarts, it often has several more failures before it returns to normal. It all works perfectly for as much as 100’s of cycles and then the connection just seems to freeze. ![]() The Delay() statement is used a lot within the voltage-measuring loop and - after that, in another loop - to limit reads to about one per minute. The sketch reads the CT multiple times to compute an RMS average and then send it through WiFi to a Server. It is fairly simple code which I am happy to share if we need to move past my conceptual question. I have set up a current transformer sensor to see if dust filters are running in our wood-working workshop.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |