Hello!
I experience strange behaviour. Actually I experienced it from the very beginning but did not pay attention. So, my Trinket M0 executes its main.py program only when it is connected to a USB host.
In other words:
a) Trinket M0 - 20 mm battery = main.py does not start. Lights are on but nothing happens.
b) Trinket M0 - USB cable - Power socket = main.py does not start. Lights are on but nothing happens.
c) Trinket M0 - USB cable - iPad = main.py starts succesfully.
What could be the reason?
Trinket M0 starts main.py only in USB conn mode
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- plodozhor
- Posts: 12
- Joined: Tue Feb 02, 2021 10:11 am
- plodozhor
- Posts: 12
- Joined: Tue Feb 02, 2021 10:11 am
Re: Trinket M0 starts main.py only in USB conn mode
FYI: file boot_out.txt says CircuitPy version is 3.1.1 on 2018-11-02; samd21e18
Looks like the CIRCUITPY drive is active only when mounted as filesystem to iOS or Windows device, which automatically means /CIRCUITPY/main.py is inaccessible otherwise.
Also, the Dotstar light behaves differently. When M0 is connected to battery, it emits pink and when connected to USB power socket it emits blue+green.
Looks like the CIRCUITPY drive is active only when mounted as filesystem to iOS or Windows device, which automatically means /CIRCUITPY/main.py is inaccessible otherwise.
Also, the Dotstar light behaves differently. When M0 is connected to battery, it emits pink and when connected to USB power socket it emits blue+green.
- plodozhor
- Posts: 12
- Joined: Tue Feb 02, 2021 10:11 am
Re: Trinket M0 starts main.py only in USB conn mode
Is my Trinket faulty and I have to send it back or there is a way to remediate it?
- adafruit_support_carter
- Posts: 29056
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Trinket M0 starts main.py only in USB conn mode
It may have something to do with the actual code in main.py. But first, let's update the firmware on the Trinket. The 3.11 version of CircuitPython is pretty old at this point.
Make a backup of any code you have stored on your Trinket. Like your main.py file.
Then, grab the latest firmware UF2 file from here:
https://circuitpython.org/board/trinket_m0/
And the latest library bundle from here:
https://circuitpython.org/libraries
Once everything is updated, see if you get the same behavior. Also try with a simple LED blink as your main.py.
Make a backup of any code you have stored on your Trinket. Like your main.py file.
Then, grab the latest firmware UF2 file from here:
https://circuitpython.org/board/trinket_m0/
And the latest library bundle from here:
https://circuitpython.org/libraries
Once everything is updated, see if you get the same behavior. Also try with a simple LED blink as your main.py.
- plodozhor
- Posts: 12
- Joined: Tue Feb 02, 2021 10:11 am
Re: Trinket M0 starts main.py only in USB conn mode
Thanks a lot! Will do as you instructed. Is it possible to flash newer CircuitPy only using a PC or iPad/iPhone will work as well?
Please be positive and constructive with your questions and comments.