Coreink power off not working?
-
Hi there,
Just developed a neat little bit of code in UIFlow that performs various GETs on URLs, which in turn set off Alexa routines.
It works perfectly, but I've run into a problem.
After each URL is triggered, I want to power down the Coreink to save battery. The idea being, is that someone will power it on when they want to perform a function. However, using the Hardware --> Power --> Power off block doesn't seem to work. The function that it runs in works as expected, but the actual power off doesn't do anything. I'm still able to interact with the device.
For now, what I've done is to change the "power off" block for an execute one, that runs
machine.deepsleep()
.This does work, but it's obviously not powering down the device completely.
Is there some magic that needs to be performed to get the "power off" block to work?
This is how the function currently looks:
And the rendered MPython:
def PowerDown(): global ArrowPos txtTitle.setText(' Powered off') txtGreen.hide() txtOrange.hide() txtRed.hide() txtArrow.hide() txtPowerStatus.hide() coreInkSetHV(1) coreInkShow() wait(1) machine.deepsleep()
If I change that
machine.deepsleep()
topower.off()
, then the code keeps running!Any ideas?
-
-
@felmue Thanks, although that doesn't work either. Even when running from battery, the power off seems to be just ignored (the code carries on running).
-
Hello @wumfi
thank you for reporting back. I've just finished a project with my M5CoreInk (running from battery only) which shuts itself off at the end and that works fine. So I am not sure why it wouldn't work for you, sorry.
Thanks
Felix -
@felmue Would you mind sharing your code? At least, the part that does the shutdown?
-
-
@felmue Well that's weird. Your code runs fine, and the unit powers off! I must have some screwy logic in mine somewhere. Thank you for your help.