Replies: 1 comment 1 reply
-
@probonopd Sorry, I am not familiar with the programming under Arduino, but under the esp-idf framework, you can use |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How to resume from deep sleep upon receiving "POWER ON" IR code?
I have set up the ESP32 to wake up whenever the IR receiver pin is pulled low (as happens at the start of every IR code).
It then wakes up, but on any IR code (and also on random noise on the IR receiver pin).
How can I get it to check for the correct "POWER ON" IR code, and only then run the rest of the sketch and go back to deep sleep otherwise?
Possibly I need to use a Deep Sleep Wake Stub.
But it is unclear to me how to write put the timings of pin changes into the array in
esp_wake_deep_sleep(void)
.https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/deep-sleep-stub.html mentions Rules for Wake Stubs, but it doesn't show how to measure time between pin changes.
Normally one could do something using
micros();
anddigitalRead()
but these are Arduino functions unavailable to a Deep Sleep Wake Stub. The Rules for Wake Stubs say what you can't do, but they don't explain how to do it. It is unclear to me how to do it without violating those rules. The example linked there doesn't show how to read pin states and timings either.Any help appreciated.
Beta Was this translation helpful? Give feedback.
All reactions