0

Trinket M0 dotstar always on
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Trinket M0 dotstar always on

by JOTS on Sun Jan 13, 2019 5:37 pm

I just starting using a trinket for the first time. I am using maker.makecode.com.

I can blink D13, use a button to turn it on and off, etc. For any of my scripts the onboard dotstar is always on a pink/purple color. If I try and set it to different colors it doesn't affect it, if I try to set the brightness to 0 it doesn't affect it. Am I missing something basic, or do I have a defective unit?

This is an example of my extremely simple test, that results in the pixel always being on (which happens for any script)
input.buttonD1.onEvent(ButtonEvent.Down, function () {
pins.D13.digitalWrite(true)
})
input.buttonD1.onEvent(ButtonEvent.Up, function () {
pins.D13.digitalWrite(false)
})
forever(function () {
pixel.setColor(0x000000)
pixel.setBrightness(0)
})

JOTS
 
Posts: 8
Joined: Thu Dec 31, 2015 1:43 pm

Re: Trinket M0 dotstar always on

by PeteH51 on Sun Jan 13, 2019 9:28 pm

What is your code file named? It should be code.txt or .py OR main.txt or .py those are the filenames the sw looks to run.
You may have to manually rename them.

PeteH51
 
Posts: 18
Joined: Sun Jan 06, 2019 12:04 pm

Re: Trinket M0 dotstar always on

by JOTS on Mon Jan 14, 2019 10:31 am

Thanks Pete, but I am not using python. I'm trying to usethe generated .uf2 files downloaded from maker.makecode.com. The odd thing is D13 works, so I think my code is running,, just that the dotstar is acting in an unexpected way.

thanks,
Jon

JOTS
 
Posts: 8
Joined: Thu Dec 31, 2015 1:43 pm

Re: Trinket M0 dotstar always on

by adafruit_support_carter on Tue Jan 15, 2019 4:15 pm

maker.makecode.com is beta. Some functionality may not be supported yet.

adafruit_support_carter
 
Posts: 11032
Joined: Tue Nov 29, 2016 2:45 pm

Re: Trinket M0 dotstar always on

by JOTS on Thu Jan 17, 2019 5:27 pm

Can you confirm that this is known/expected behavior at this point? I want to confirm that my board is not defective.

Thanks,
Jon

JOTS
 
Posts: 8
Joined: Thu Dec 31, 2015 1:43 pm

Re: Trinket M0 dotstar always on

by adafruit_support_carter on Thu Jan 17, 2019 5:54 pm

Not really, since I don't know what it's actually doing codewise.

If you double press reset so that you see the TRINKETBOOT folder, the DotStar should be green and the little red LED next to the micro USB connector should be on.

Another idea would be to use CircuitPython, then we can control it directly.

adafruit_support_carter
 
Posts: 11032
Joined: Tue Nov 29, 2016 2:45 pm

Re: Trinket M0 dotstar always on

by garyhlucas on Wed Jan 30, 2019 10:05 am

I have 3 trinket M0 and can confirm that they all have the dotstar showing a purple color all the time. I want to use the onboard dotstar to show the color that a color sensor uses and trying to find the code to drive that dotstar.

garyhlucas
 
Posts: 17
Joined: Mon May 21, 2018 9:00 pm

Re: Trinket M0 dotstar always on

by adafruit_support_carter on Wed Jan 30, 2019 1:38 pm

It is probably not supported in maker.makecode.com at this time.

It is supported in Arduino and CircuitPython.

adafruit_support_carter
 
Posts: 11032
Joined: Tue Nov 29, 2016 2:45 pm

Re: Trinket M0 dotstar always on

by SR_MOMENT on Mon Apr 29, 2019 3:24 pm

I had that problem as well. I copied a program text to flash the red led on and off. Copied the text into a blank new page in the Mu/circuitPython editor and saved it as code.py. It loaded fine and I played with timing. Then when I tried to load main.py it would not load, nothing changed on board. I had to rename files with the one I wanted to load to be named code.py. My just completed program now loaded which manipulates the death star... I mean dot star. What's up with that?

SR_MOMENT
 
Posts: 1
Joined: Mon Apr 29, 2019 2:55 pm

Re: Trinket M0 dotstar always on

by adafruit_support_carter on Mon Apr 29, 2019 3:37 pm

There are several file names that are run automatically:
https://learn.adafruit.com/welcome-to-c ... -file-7-30
But in a certain order. The first one found is the one that runs.

adafruit_support_carter
 
Posts: 11032
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.