main.py isn't running when Pico connected to external power
main.py isn't running when Pico connected to external power
I think I'm missing a step somewhere. Can't get Pico to run when it isn't being powered by the micro-USB.
Have a main.py to blink the on board LED. Trying to power it by connected 5 VDC to VSYS. I'm using Thonny with the Micropython interpreter to save the program onto the Pico. Program just doesn't seem to be running at all.
Is there a guide somewhere or a simple tutorial that anybody can link me where the Pico isn't being powered through the USB port? I think I must be missing something
Thanks in advance
Have a main.py to blink the on board LED. Trying to power it by connected 5 VDC to VSYS. I'm using Thonny with the Micropython interpreter to save the program onto the Pico. Program just doesn't seem to be running at all.
Is there a guide somewhere or a simple tutorial that anybody can link me where the Pico isn't being powered through the USB port? I think I must be missing something
Thanks in advance
Re: main.py isn't running when Pico connected to external power
That seems to work fine for me.
I created main.py with the following: and blinky.py with I verified that powering up via USB worked. Then I disconnected the USB cable and connected VSYS and GND to a 5V source and the blinky program is running.
I created main.py with the following:
Code: Select all
import blinky
Code: Select all
from machine import Pin, Timer
led = Pin(25, Pin.OUT)
tim = Timer()
def tick(timer):
global led
led.toggle()
tim.init(freq=2.5, mode=Timer.PERIODIC, callback=tick)
Re: main.py isn't running when Pico connected to external power
Since you are using Thonny: Are you sure that you really copied the main.py file to the board? Just running the files with Thonny dos nto copy it permanently to the boards file system.
Re: main.py isn't running when Pico connected to external power
I used rshell to copy files onto Pico MicroPython flash filesystem (cp main.py /pyboard).
Today I copied boot.py and main.py, and both get executed, on powering as well as on soft reboot:
https://www.raspberrypi.org/forums/view ... 3#p1830113
Today I copied boot.py and main.py, and both get executed, on powering as well as on soft reboot:
https://www.raspberrypi.org/forums/view ... 3#p1830113
Pico-W Access Point static file webserver:
https://github.com/Hermann-SW/pico-w
Tiny MicroPython robots (the PCB IS the robot platform)
viewtopic.php?f=5&t=11454
webrepl_client.py
https://github.com/Hermann-SW/webrepl#webrepl-shell
https://github.com/Hermann-SW/pico-w
Tiny MicroPython robots (the PCB IS the robot platform)
viewtopic.php?f=5&t=11454
webrepl_client.py
https://github.com/Hermann-SW/webrepl#webrepl-shell
Re: main.py isn't running when Pico connected to external power
At the moment I'm doing;
Save As --> Raspberry Pi Pico --> "main.py", save
Is that correct?
- aivarannamaa
- Posts: 171
- Joined: Fri Sep 22, 2017 3:19 pm
- Location: Estonia
- Contact:
Re: main.py isn't running when Pico connected to external power
This should do.
Does it start running again when you reconnect USB? Can it be powering issue?
Aivar Annamaa
https://thonny.org
https://thonny.org
Re: main.py isn't running when Pico connected to external power
Can you post your main.py?
Are you sure, you are not missing any import or pin setting in your software?
Are you sure, you are not missing any import or pin setting in your software?
Re: main.py isn't running when Pico connected to external power
Hi,
i have faced the same problem as ssfel. Unfortunately none of the suggestions has been helpful.
At least for my application I found a workaround:
I start main.py as usual having the pico connected via an USB cable. Then connect an external 5V source to VSYS. Now I can unplug the USB connection and the pico continues to run.
Any better solution is still welcome.
i have faced the same problem as ssfel. Unfortunately none of the suggestions has been helpful.
At least for my application I found a workaround:
I start main.py as usual having the pico connected via an USB cable. Then connect an external 5V source to VSYS. Now I can unplug the USB connection and the pico continues to run.
Any better solution is still welcome.
Re: main.py isn't running when Pico connected to external power
As @roberthh did suggest:
Don't trust thonny or any fancy, colorful gui.
Verify that main.py is really on the device using pyshell or the like. You can also check with a small uPy program whether main.py is really where it belongs (next to boot.py).
Don't trust thonny or any fancy, colorful gui.
Verify that main.py is really on the device using pyshell or the like. You can also check with a small uPy program whether main.py is really where it belongs (next to boot.py).
A few hours of debugging might save you from minutes of reading the documentation!
My repositories: https://github.com/karfas
My repositories: https://github.com/karfas