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.
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
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).
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.
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.