I’ve had luck before with the trinket mo but not with this one. I’ve done everything I’ve done on another and keep getting the red light flashing twice error. I’ve updated the uf-2 to 7.3 and tried 8.0 and keep getting same error. Any suggestions?
Also I’m using windows 11 with mu editor
Trinket Mo flashes red twice
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_carter
- Posts: 29189
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Trinket Mo flashes red twice
It sounds like you are still able to get the board into bootloader mode?
Are 7.3 and 8.0 are CircuitPython versions?
Are 7.3 and 8.0 are CircuitPython versions?
- Smurfcivic
- Posts: 15
- Joined: Sat Aug 20, 2022 4:54 pm
Re: Trinket Mo flashes red twice
I can program it using arduino but not circuit python
- adafruit_support_carter
- Posts: 29189
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Trinket Mo flashes red twice
Are you able to access the serial console in Mu? To be able to see the CircuitPython output?
- Smurfcivic
- Posts: 15
- Joined: Sat Aug 20, 2022 4:54 pm
Re: Trinket Mo flashes red twice
yes this is what it says
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
Press any key to enter the REPL. Use CTRL-D to reload.
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
Press any key to enter the REPL. Use CTRL-D to reload.
- Smurfcivic
- Posts: 15
- Joined: Sat Aug 20, 2022 4:54 pm
Re: Trinket Mo flashes red twice
and heres whats on it
- Attachments
-
- IMG_4591.jpg (36.23 KiB) Viewed 201 times
- adafruit_support_carter
- Posts: 29189
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Trinket Mo flashes red twice
OK, it looks like CircuitPython is generally installed and running fine. The two red blinks are indicating an exception:
https://learn.adafruit.com/welcome-to-c ... er-2978455
That'd be an issue with the code in code.py. There should be more lines shown above this:
In Mu, you may need to drag the top bar of the Serial window up to see more lines. Or try scrolling. Look for several lines that start with "Traceback" and paste those here.
https://learn.adafruit.com/welcome-to-c ... er-2978455
That'd be an issue with the code in code.py. There should be more lines shown above this:
Code: Select all
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
Press any key to enter the REPL. Use CTRL-D to reload.
- Smurfcivic
- Posts: 15
- Joined: Sat Aug 20, 2022 4:54 pm
Re: Trinket Mo flashes red twice
im not seeing what your describing
- Attachments
-
- IMG_4597.jpg (39.04 KiB) Viewed 195 times
- Smurfcivic
- Posts: 15
- Joined: Sat Aug 20, 2022 4:54 pm
Re: Trinket Mo flashes red twice
Now its showing memory error
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
Press any key to enter the REPL. Use CTRL-D to reload.
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
MemoryError: memory allocation failed, allocating 1609 bytes
Code done running.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 7.3.3 on 2022-08-29; Adafruit Trinket M0 with samd21e18
>>> [D
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
Press any key to enter the REPL. Use CTRL-D to reload.
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
MemoryError: memory allocation failed, allocating 1609 bytes
Code done running.
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 7.3.3 on 2022-08-29; Adafruit Trinket M0 with samd21e18
>>> [D
- adafruit_support_carter
- Posts: 29189
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Trinket Mo flashes red twice
Thanks. Yep, that's the error:
The Trinket M0 is a pretty memory constrained device. So this unfortunately commonly comes up. In general, you're attempting something, in code.py, that's just too big, in terms of memory requirements, to run on that board.
What is your code.py?
Code: Select all
MemoryError: memory allocation failed, allocating 1609 bytes
What is your code.py?
- Smurfcivic
- Posts: 15
- Joined: Sat Aug 20, 2022 4:54 pm
Re: Trinket Mo flashes red twice
im building these. Mainly trying to use with the rotary encoder so my son can change modes on his glasses for trickrtreating
https://learn.adafruit.com/watchmen-sis ... ggles/code
https://learn.adafruit.com/watchmen-sis ... ggles/code
- adafruit_support_carter
- Posts: 29189
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Trinket Mo flashes red twice
Try removing all the text in the header comments of code.py. Those are just comment lines and are not needed for the code to run.
Look for this line (should be line 35):
and delete everything above that so that line becomes the new first line of code.py.
Look for this line (should be line 35):
Code: Select all
from math import modf, pi, sin
- Smurfcivic
- Posts: 15
- Joined: Sat Aug 20, 2022 4:54 pm
Re: Trinket Mo flashes red twice
ok trying now
- Smurfcivic
- Posts: 15
- Joined: Sat Aug 20, 2022 4:54 pm
Re: Trinket Mo flashes red twice
i believe that worked! about to solder the encoder back on and see
- Smurfcivic
- Posts: 15
- Joined: Sat Aug 20, 2022 4:54 pm
Re: Trinket Mo flashes red twice
Appreciate the help! I got them working finally after fighting it all week! Ended up messing up one board soldering to. Luckily I had a spare lol
Please be positive and constructive with your questions and comments.