-
Notifications
You must be signed in to change notification settings - Fork 7.7k
-
To save energy I put the ESP32 in Light sleep mode after some minutes. Then I have a photoresistor that detects when a light is turned on and it should wake up the ESP32.
touchAttachInterrupt(READ_VALUE, loop, THRESHOLD);
esp_sleep_enable_touchpad_wakeup;
I've tried the above code, but found out that the touchAttachInterrupt
wakes up when the READ_VALUE
is below THRESHOLD
, but I want to wake up when READ_VALUE
is above the THRESHOLD
.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 3 comments
-
Have you ever found a solution?
Beta Was this translation helpful? Give feedback.
All reactions
-
Don't understand the problem. A lot of phototransistors are NPN. If you use such a phototransistor as common emitter with a resistor between collector and Vcc, voltage across phototransistor will go down, when it gets light.
Beta Was this translation helpful? Give feedback.
All reactions
-
I think that using touch to wake up isn't a good way.
It may be better to use an external circuit that triggers clear levels (High 3.3v or Low 0v) to an ESP32 port and make the ESP32 wake up based on a pin level.
The external circuit can use some potentiometer to adjust the lighting level for triggering a transistor that would set the ESP32 pin level.
Or it can also use something more elaborate.
Beta Was this translation helpful? Give feedback.