Closed tanakamasayuki closed 4 years ago
I do not want you to wake with the left button. I want to control it myself.
Now only the screen wake.
#include <M5StickC.h> void setup() { M5.begin(); M5.Lcd.fillScreen(BLACK); M5.Lcd.println("Sleep Test"); M5.Lcd.println("BtnA : WAKE"); M5.Lcd.println("BtnB : Sleep"); } void loop() { M5.update(); // Sleep if( M5.BtnB.wasReleased() ){ // BtnA wakeup setup pinMode(GPIO_NUM_37, INPUT_PULLUP); esp_sleep_enable_ext0_wakeup(GPIO_NUM_37, LOW); // axp sleep(disable left side wake key) M5.axp.SetSleep(false); // deep sleep esp_deep_sleep_start(); } }
I do not want you to wake with the left button. I want to control it myself.
Now only the screen wake.
USE CASE