M5StickCPlus MicrPython power saving
-
Hi,
Which MicroPython APIs can help reduce power drain on M5StickCPlus?I was unable to get basics to work:
- lcd.setBrightness(0-100) # didn't change LCD backlight brightnes
- power.getBatteryLevel() # didn't seam to work
- No API to turn off wifi mentioned at: https://github.com/m5stack/UIFlow-Code/wiki/Advanced - does this work: wifiCfg.wlan_sta.active(False)
Are there other APIs to turn on/off parts of device , or to reduce power drain?
Thanks
-
@wonkothesane Hi, Usually what you can do is depends on your task to put your ESP32 device into deep sleep mode which will automatically turn off WiFi and other power consuming devices on top of the Stick-C.
-
Hello @WonkoTheSane
try the following commands:
from m5stack import * import machine axp.setLcdBrightness(50) # set LCD backlight brightness axp.getBatVoltage() # get battery voltage machine.deepsleep(10000) # deep sleep for 10 seconds machine.lightsleep(10000) # light sleep for 10 secondsabout WiFi: I don't know how to turn WiFi off with MircoPython, sorry. Somebody else might have an idea?
Cheers
Felix -
Hi @felmue,
Unfortunately on myM5StickPlus axp.setLcdBrightness(50)gives an error.Maybe it has different MicroPython hardware APIs than your device?
-
Hello @WonkoTheSane
Hmm, did you include the line
from m5stack import *?I have UIFlow 1.6.6 firmware installed on my M5StickC Plus and use Blockly's
Set screen brightnessblock then switched to thePythontab.Thanks
Felix
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login