![]() The ISR runs a micros() routine that takes a snapshot of the “time1” when the interrupt happened. A single LOW/FALLING signal on pin12 wakes up the ESp32 from deep sleep using the ext0 wake up event and an attach interrupt with ISR. How it supposed to work: The first LOW/FALLING signal is always on pin 12 and the second LOW/FALLING always on pin 27. They always come in pairs and randomly seconds or minutes apart. The signals come on both pins and drop fast (about 20-40ns) and are about 200-800 micro-seconds apart in duration. The other program measures the time difference between two separate LOW or FALLING signals on Pin 12 and 27 of the ESP32 SparkFun Thing Plus. One program is deep sleep with ext0 (and/or ext1) wake interrupt on which I got off the web. The Arduino program is a marriage of two separate Arduino programs, both work. The code is not that difficult so you may want to skip to “the problem” section below to spare you the details. I think I am very close to the solution (maybe couple of lines of codes away), but the answer seems to lie in the memory state of the ESP32 after coming back from “deep sleep”. My knowledge is lacking and unable to progress further.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |