12345678910111213141516171819202122232425262728293031 |
- #include <M5Stack.h>
- void setup(){
-
- M5.begin();
-
-
- M5.Power.begin();
-
- M5.Lcd.setTextSize(2);
- M5.Lcd.println("Software Power-OFF Demo");
- M5.Lcd.println("Press Button A ...");
- }
- void loop() {
- if(M5.BtnA.wasPressed()) {
- M5.Power.powerOFF();
- }
- M5.update();
- }
|