Arduino Sleep + setPowerSave ≠ Wake #1571
Replies: 2 comments 5 replies
-
Just to clarify: The setPowerSave feature in u8g2 has nothing todo with the micro controller, it just reduces power for the display. |
Beta Was this translation helpful? Give feedback.
-
What I understood is this: You system just stops working at a certain time. However, I do not think this is related to u8g2.setPowerSave at all. I think if you would remove both u8g2.setPowerSave statements, then still the system would stop working. Instead I think the problem is caused by some watchdog timeout. Maybe you need to call the yield() function in the while loop of the Graphics() procedure. https://www.arduino.cc/en/Reference/SchedulerYield https://stackoverflow.com/questions/34497758/what-is-the-secret-of-the-arduino-yieldfunction |
Beta Was this translation helpful? Give feedback.
-
Hello everyone,
I need some help while working with the setPowerSave feature in u8g2 and Arduino low power mode. Basically, the issue seems that the CPU doesn't seem to wake up if power save is enabled in u8g2. Its likely that my implementation is wrong, but I'm not sure how else to implement this feature. The setup is using an Arduino Pro mini 3.3v, connected to 128x64 OLED display via I2C. Please help me out on this:
Below is the output when "LowPower.powerDown(SLEEP_2S, ADC_OFF, BOD_OFF);" in the loop section is commented out.
Here's the output when "u8g2.begin()" in the setup section is disabled:
And, here is the output when both are enabled. This is where the issue occurs:
18:56:38.881 -> About to sleep 18:56:41.594 -> Awake
The cycle does not go beyond this point. Please help me to resolve this issue.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions