WIO won't start on usb power only. Only starts when connected to PC

Hi

I’m not sure if I’m misunderstanding something basic here, but I can’t seem to understand this behaviour.

My expectation is that when the device is powered on from a mobile power bank or wall socket, the main.py file on the device will start running. For me this is not happening even with the basic BLINK program.

I have Ardupi installed on device and, with the VS code extension, I can write code and deploy it and it runs just fine. I can even just plug the device in as flash drive mode and copy a new main.py over and it immediately starts running; it doesn’t run on it’s own until i copy the file though.

But, powering it on from a normal power outlet… nothing. Nothing runs. It’s like it’s missing it’s ‘go’ cue.

Any help will be appreciated as it’s pretty useless to my like this.

Hi @N3Cr0,

Could you create a new file named boot.py inside the ARDUPY Drive and copy your codes into that file? Then connect the Wio Terminal to power bank/ wall socket and turn it on. It will execute the code.

This is the general behavior:

main.py: Code executes as soon as you save the file. When you turn OFF Wio Terminal and turn back ON, the code will not execute automatically. You have to manually open the file and save it. Then it will execute the codes.
boot.py: When you turn OFF Wio Terminal and turn back ON, the code will execute automatically.

Hope it helps!

Also, welcome to follow the ArduPy video tutorial series on Seeed YouTube :slight_smile:

Best Regards,
Lakshantha

1 Like

:slight_smile: so simple. Thanks.

I must have missed that fact in the quickstart (if its in there) and kinda got fixated on solving it before jumping into your video tutorials (which may have told me exactly this).

Thanks. That helps.

1 Like

Hello,
I tried everything, but it doesn’t work to flash the blue light.
What can I try?
When I look in Visual studio Code, in the terminal, I get:

E:>python e:/main.py
‘Python’ is not recognized as an internal or external command, operable program or batch file

What am I doing wrong?..

Hi @frederik.vandesteene,

Can I know how you are running the code? Did you put main.py inside the ARDUPY drive in file explorer?

Best Regards,
Lakshantha

Hi @lakshan
Same question in Arduino mode. How do I get to start my program when the Wio Terminal is not connected to the computer? Currently I need to open Serial Monitor on the PC to get my sketch running on the Wio Terminal.

Hi @OlivierB,

I have replied here:

Let’s follow up in that post.

Best Regards,
Lakshantha

I have a similar issue, but I am NOT using ardupy.

I have sucessfully loaded your DHT11 <–> Thingspeak tutorial, which is built on C++

When connected to my Linux Ubuntu 21.04 usb port, the wio boots up and subsequently displaye the Temperature/Humidity and uploads it to Thingspeak.

Nothing happens if I power it from a 5V USB wall adapter, it draws less than 4mA as opposed to well over 100mA on the PC’s USB port when the code is running.

So in this case, your boot.py suggestion does not work.

Thanks for all your help!

I am using Arduino and wio terminal with battery pack,when I disconnect USB and power from battery pack, it (wio) does not boot

-Thanks

I found the problem, in my code I was doing while( !Serial) {delay(100)} , I put a fix and it works now