How to disable the DotStar?

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.
Locked
User avatar
dlc_op
 
Posts: 20
Joined: Fri Nov 18, 2016 5:13 pm

How to disable the DotStar?

Post by dlc_op »

It seems that the DotStar will emit unless you specifically turn it off. Meaning, if your code (CircuitPython, Arduino) does not explicitly control the DotStar, it'll always turn on, full brightness, blinding you and using a ton of power.
Is there some way to disable that thing so that it does not turn on unless explicitly commanded to do so?

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: How to disable the DotStar?

Post by mikeysklar »

@dlc_op,

Can you be a little more specific about your setup? Are you using a DotStar strip or is it the individual LED on one of our Adafruit boards that you wish to have completely off? If it is a strip or other external DotStar layout please let me know what type of device you are driving it with (Pi, Feather, UNO, etc.). Are you using Circuit Python or Arduino?

User avatar
dlc_op
 
Posts: 20
Joined: Fri Nov 18, 2016 5:13 pm

Re: How to disable the DotStar?

Post by dlc_op »

The DotStar built in to the Trinket M0

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: How to disable the DotStar?

Post by mikeysklar »

The built-in DotStar can turned off with something like the following example code.

Code: Select all

import time
import board

# For Trinket M0, Gemma M0, ItsyBitsy M0 Express, and ItsyBitsy M4 Express
import adafruit_dotstar
led = adafruit_dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1)

led.brightness = 0
led[0] = (0, 0, 0)
led.show()

User avatar
dlc_op
 
Posts: 20
Joined: Fri Nov 18, 2016 5:13 pm

Re: How to disable the DotStar?

Post by dlc_op »

Understood, and I am doing that.
However, in the brief moment between when the power is applied and that code is run, the DotStar turns on full, resulting in a quick bright flash.
Is there no way to prevent that flash?
For example, does the DotStar have some config field that can be set & which survives power cycling?
Seems odd that the DotStar would default to "full on".... every peripheral I've ever used defaults to off and you must explicitly command it to an on state.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: How to disable the DotStar?

Post by mikeysklar »

I believe there are two options which you will have to explore further on your own.

1. Use boot.py which runs before code.py, but might not be early enough for you. In which case you should be able to use my python example for shutting off the code.

2. Build your own CircuitPython. Seems kind of extreme and probably a lot more convenient to cut the LED trace on your trinket.

https://learn.adafruit.com/building-cir ... cuitpython

User avatar
dlc_op
 
Posts: 20
Joined: Fri Nov 18, 2016 5:13 pm

Re: How to disable the DotStar?

Post by dlc_op »

I'll cut the trace :)
Thanks!

User avatar
jkaiser20
 
Posts: 6
Joined: Fri Jan 03, 2020 7:37 pm

Re: How to disable the DotStar?

Post by jkaiser20 »

dlc_op wrote:I'll cut the trace :)
Thanks!
Did this work easily for you? I hate to kill it forever, but man that thing is annoying.

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

Return to “Trinket ATTiny, Trinket M0”