Adafruit Industries, Essential service and business: NYC – Executive Order 202.6 - Read more.
0

Trinket won't power from power pack
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Trinket won't power from power pack

by Packmanian on Wed Mar 25, 2020 5:38 pm

Hi,

Trinket newbie here: I've just bought my first Trinket M0 and a Neopixel ring. When I connect everything up and plug the Trinket into a PC USB port the example code runs without problems - the LEDs slowly revolve and the dotstar LED cycles through the colours. However when I try to run the Trinket from a power pack the board just has a green LED and the dotstar goes a pink colour, the neopixel ring does not light at all.

I have tried several power packs and also phone chargers but nothing works. I also connected the Trinket to the PC using a USB lead that doesn't have any data connections and the Trinket would not work like this either. I have tried this with and without the Neopixel ring connected and it makes no difference. Am I missing something obvious?

Packmanian
 
Posts: 3
Joined: Tue Mar 24, 2020 8:19 am

Re: Trinket won't power from power pack

by dastels on Thu Mar 26, 2020 10:32 am

Are you working in Arduino or CircuitPython?

Dave

dastels
 
Posts: 1904
Joined: Tue Oct 20, 2015 3:22 pm

Re: Trinket won't power from power pack

by Packmanian on Thu Mar 26, 2020 11:23 am

I'm using CircuitPython. I have now managed to work around the problem without actually solving it. I have deleted the default "main.py" and adapted the code from the Neopixels page to suit my needs. https://learn.adafruit.com/adafruit-neo ... cuitpython

I'm not really sure why this works and the default file doesn't, maybe it is something to do with one of the extra imported libs in the default code.

Thanks for your response.

Packmanian
 
Posts: 3
Joined: Tue Mar 24, 2020 8:19 am

Re: Trinket won't power from power pack

by dastels on Thu Mar 26, 2020 11:47 am

only one of code.txt, code.py, main.py, main.txt will be loaded and run... the first one from that list that is found.

What do you mean by "the default file"? One that was on the Trinket when you received it?

My thinking was/is that it was trying to communicate with the computer, though I haven't seen that be as issue in CircuitPython as it is when using Arduino.

Anyway, I'm glad it's working for you now.

Dave

dastels
 
Posts: 1904
Joined: Tue Oct 20, 2015 3:22 pm

Re: Trinket won't power from power pack

by Packmanian on Thu Mar 26, 2020 11:55 am

Yeah sorry, by default I mean the "main.py" that is already on the Trinket when it is supplied.

"main.py" imports quite a few libs and my guess was that one of these is trying to access something via the USB connection. I'm sorted for now but no doubt this will rear up again if I stumble across the offending library in the future.

Packmanian
 
Posts: 3
Joined: Tue Mar 24, 2020 8:19 am

Please be positive and constructive with your questions and comments.