@felmue said in lowest power m5paper?:
M5.disableEXTPower()
hi felix,
turning off external power works. great!
about turning back on the screen, please see code and screen pictures below. without M5.disableEPDPower() and M5.enableEPDPower() it all works nicely. with turning on/off the screen i do see sort of that it is running but the screen does not "work" properly - i.e. i do not see the number increasing. (and "the noise" is getting worse over time). what am i doing wrong?
thanks
frank
#include <M5EPD.h>
#include <EEPROM.h>
// m5paper
M5EPD_Canvas canvas(&M5.EPD);
int count;
int boot;
void setup() {
M5.begin();
M5.EPD.SetRotation(0);
// cleanig the screen by alternating all pixels set, all pixels reset
M5.EPD.Clear(true);
// use rtc
M5.RTC.begin();
canvas.createCanvas(960, 540);
canvas.setTextSize(8);
canvas.clear();
canvas.drawString("Sleep Test...", 50, 50);
canvas.pushCanvas(0, 0, UPDATE_MODE_DU4);
delay(1000);
EEPROM.begin(10);
boot = EEPROM.read(0);
boot++;
EEPROM.write(0,boot);
EEPROM.commit();
count = 0;
}
void loop() {
canvas.clear();
char printBuffer[64];
sprintf(printBuffer, "b=%d, c=%d",boot, count);
canvas.drawString(printBuffer, 50, 50);
canvas.pushCanvas(0, 0, UPDATE_MODE_DU4);
count++;
delay(1000);
gpio_hold_en((gpio_num_t)M5EPD_MAIN_PWR_PIN);
esp_sleep_enable_timer_wakeup(5 * 1000000);
// turn off power to screen
// M5.disableEPDPower();
// turn off power to ports
M5.disableEXTPower();
// sleeps, wakesup and continues
esp_light_sleep_start();
// sleeps, wakesup and restarts
// esp_deep_sleep_start();
// shutsdown
// M5.shutdown(5);
// turn on power to screen
// M5.enableEPDPower();
// turn on power to ports
M5.disableEXTPower();
}
without turning off/on power to screen:

with turning off/on power to screen:
