Is it possible?
Has anyone used MPU-6050 gyroscope and accelerometer to trigger Deep Sleep and to be used as external trigger to awaken from Deep Sleep?
How was this accomplished?
Have a project box; when left stationary want it to go into deep sleep after a timer expires and box is stationary. When box is not stationary to awaken from deep sleep.
Some sensors have a digital pin that will output a digital HIGH signal when the readings reach a certin threshold. That ignal could be used to wake up the board. However, I’m not sure if there is any MPU6050 gyroscope model with that feature.
The MPU6050 module usually comes with an INT (interrupt pin) that maybe can be used for that. I don’t know specific details about pin, but I think it may be a good starting point.
I hope this helps.
Found an article relatated to the question:
How to generate hardware interrupt in mpu6050 to wakeup arduino from SLEEP_MODE_PWR_DOWN mode?
Thank you for your feedback Sara.
Disadvantage of using MPU6050 is it consumes battery. Thinking about adding a push button to wake ESP32 from deep sleep; then start a timer that until it expires, ESP32 would be awake.
Have decided to use push button to awaken ESP32 and start a timer that determines when to put the project box into deep sleep.