PICO W lightsleep doesn't work when using rshell #12573
Replies: 8 comments 20 replies
|
https://blog.martinfitzpatrick.com/using-micropython-raspberry-pico/ tells me to download:
|
|
Is there any output on stop? |
|
As a stand-alone unit powered by Vsys the program is still running, I can see the supply current changing. However, plugging it into the USB port, pulling the RUN port low briefly and then hitting enter on
Off to buy a PICO. |
|
Fired-up up a PICO with V1.20 and the latest nightly release. The following script runs OK until lighsleep is introduced to either firmware version. from time import sleep
from machine import lightsleep
while True:
print ('waiting 2 seconds for a CTRL-C')
sleep(2)
print ('going to lightsleep for 2 seconds')
sleep(0.1)
lightsleep(2000)
print ('woke-up again')
sleep(0.1)It will not run for more than30-60 seconds before locking-up. If someone could run this script that would be helpful. Thank you. |
|
@cpottle9 tried your suggestion of reducing the lightsleep period to 500ms. It still acts-up. There was a suggestion by @robert-hh that modemmanager has been implicated in this type of behaviour. Removed modemmanager and no improvement, when using rshell or Thonny. I can tell that the program is still running on the device but comms is lost out the USB port. |
|
@davefes, I assume you are building an app that will run from batteries. I have some micropython code I use to reduce power consumed for my app by manipulating some RP2040 hardware registers. I can share that code with you. |
|
What version are you using? I had it working perfectly in 1.23, and now in 1.24 I am having that issue. `from time import sleep,gmtime while True: |
|
What happened? v1.23 worked perfectly. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I can get lightsleep to work as a stand-alone device as per:
https://github.com/orgs/micropython/discussions/10889
but it appears that trying to use rshell stops lightsleep from working.
Could anyone tell me how to use rshell to monitor program execution that has a lightsleep in it?
All reactions