Trinket Mo flashes red twice

Adafruit's tiny microcontroller platform. Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
Smurfcivic
 
Posts: 15
Joined: Sat Aug 20, 2022 4:54 pm

Trinket Mo flashes red twice

Post by Smurfcivic »

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

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Trinket Mo flashes red twice

Post by adafruit_support_carter »

It sounds like you are still able to get the board into bootloader mode?

Are 7.3 and 8.0 are CircuitPython versions?

User avatar
Smurfcivic
 
Posts: 15
Joined: Sat Aug 20, 2022 4:54 pm

Re: Trinket Mo flashes red twice

Post by Smurfcivic »

I can program it using arduino but not circuit python

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Trinket Mo flashes red twice

Post by adafruit_support_carter »

Are you able to access the serial console in Mu? To be able to see the CircuitPython output?

User avatar
Smurfcivic
 
Posts: 15
Joined: Sat Aug 20, 2022 4:54 pm

Re: Trinket Mo flashes red twice

Post by Smurfcivic »

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.

User avatar
Smurfcivic
 
Posts: 15
Joined: Sat Aug 20, 2022 4:54 pm

Re: Trinket Mo flashes red twice

Post by Smurfcivic »

and heres whats on it
Attachments
IMG_4591.jpg
IMG_4591.jpg (36.23 KiB) Viewed 194 times

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Trinket Mo flashes red twice

Post by adafruit_support_carter »

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:

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

User avatar
Smurfcivic
 
Posts: 15
Joined: Sat Aug 20, 2022 4:54 pm

Re: Trinket Mo flashes red twice

Post by Smurfcivic »

im not seeing what your describing
Attachments
IMG_4597.jpg
IMG_4597.jpg (39.04 KiB) Viewed 188 times

User avatar
Smurfcivic
 
Posts: 15
Joined: Sat Aug 20, 2022 4:54 pm

Re: Trinket Mo flashes red twice

Post by Smurfcivic »

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

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Trinket Mo flashes red twice

Post by adafruit_support_carter »

Thanks. Yep, that's the error:

Code: Select all

 MemoryError: memory allocation failed, allocating 1609 bytes
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?

User avatar
Smurfcivic
 
Posts: 15
Joined: Sat Aug 20, 2022 4:54 pm

Re: Trinket Mo flashes red twice

Post by Smurfcivic »

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

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Trinket Mo flashes red twice

Post by adafruit_support_carter »

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

Code: Select all

from math import modf, pi, sin
and delete everything above that so that line becomes the new first line of code.py.

User avatar
Smurfcivic
 
Posts: 15
Joined: Sat Aug 20, 2022 4:54 pm

Re: Trinket Mo flashes red twice

Post by Smurfcivic »

ok trying now

User avatar
Smurfcivic
 
Posts: 15
Joined: Sat Aug 20, 2022 4:54 pm

Re: Trinket Mo flashes red twice

Post by Smurfcivic »

i believe that worked! about to solder the encoder back on and see

User avatar
Smurfcivic
 
Posts: 15
Joined: Sat Aug 20, 2022 4:54 pm

Re: Trinket Mo flashes red twice

Post by Smurfcivic »

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

Locked
Please be positive and constructive with your questions and comments.

Return to “Trinket ATTiny, Trinket M0”