lightsleep

RP2040 based microcontroller boards running MicroPython.
Target audience: MicroPython users with an RP2040 boards.
This does not include conventional Linux-based Raspberry Pi boards.
danjperron
Posts: 51
Joined: Thu Dec 27, 2018 11:38 pm
Location: Québec, Canada

Re: lightsleep

Post by danjperron » Sun Jul 10, 2022 4:54 pm

thanks Peter,
you confirm my finding.

I will try to figure out How to put the wifi in sleep mode.
Right now my pico is running on a lipo battery and still works! But it is still 40ma on lightsleep because of the wifi.
PICOW.jpeg
PICOW.jpeg (47.75 KiB) Viewed 2530 times
PicoWVsTime.jpg
PicoWVsTime.jpg (42.59 KiB) Viewed 2530 times

danjperron
Posts: 51
Joined: Thu Dec 27, 2018 11:38 pm
Location: Québec, Canada

Re: lightsleep

Post by danjperron » Mon Jul 11, 2022 2:06 am

OK I got it working. I didn't close the wifi correctly before.


my change is

Code: Select all

.     wlan.disconnect()
      wlan.active(False)
      wlan.deinit()
      time.sleep_ms(100)
      machine.lightsleep(120000)
And now it is 1.9ma on lightsleep

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: lightsleep

Post by pythoncoder » Mon Jul 11, 2022 8:36 am

That is useful information :D
Peter Hinch
Index to my micropython libraries.

Post Reply