Hi everyone. I'm new to individually addressable LEDs,

Hi everyone. I’m new to individually addressable LEDs, and it appears that I have made a good hardware choice (Adafruit DotStar), but that comes with fewer online examples compared to the WS2812. I am trying to modify a Griffin Powermate to use two Dotstar LEDs driven by a 5V Adafruit trinket. I have the schematic portion figured out, but I don’t know how to make these two LEDs “breathe” between two colors. I want both LEDs displaying the same color at the same time, fade out, and fade in to a secondary color. Can anyone provide a simple script, or point me to an existing script that performs this kind of activity? I tend to learn better by first modifying existing code and adapting it to work the way I need it to. Any help would be appreciated.

Welcome @Ryan_Shuck to this fun LED addiction.

Here’s something to get you started.

Btw, most any FastLED example you run across should work with WS28**, APA102 (Dotstar), LPD8806, etc pixels as long as you set things up correctly in your FastLED.addLeds line.

If you run into questions put your code on http://gist.github.com and share the link.

@Ryan_Shuck If you haven’t already found it, start reading through the wiki. Good stuff there.

Thanks @marmil , this got me going and I was able to figure it out. I then destroyed my Trinket pretty shortly after (255 is not a safe value even with only two dotstars connected). I have a new one on the way, and then my RGB Griffin Powermate will be done. Appreciate the help.

What went wrong? Which flavor of Trinket were you using?

5v Adafruit Trinket Mini, not sure exactly what happened, but it stopped working when I changed “float valueMax = 200.0” value to 255. I don’t believe I shorted anything. It now has a green light when I plug it in, but Windows says the USB device has malfunctioned. I was able to get it working with the default values (I had to change some variables to int rather than float to get it down to size) and was modifying the colors. When I uploaded the new sketch with 255, it failed immediately without a bright flash from the LED.

I should add - no Red LED activity when I plug it in, and I have hard rebooted my computer in case the USB bus didn’t like the power draw. I have the same symptoms when fed by a USB Battery pack.

@Ryan_Shuck ​, was that the brightness value you were editing to 255?

Assuming you didn’t have any accidental shorts in your circuit, I don’t see why the trinket wouldn’t be able to handle max brightness. Could possibly be a faulty board from adafruit. Adafruit has a fantastic support team, take some pictures of your circuit, and ask them, maybe you can get a replacement.

Do you have another board you might be able to run a test program with on the dotstars? Would be awful to discover those were fried as well, especially after waiting for a new board.

@Post-Master_Sodium After looking at it again, it was the “Pulse Maximum value” (float valueMax on line 19 here https://github.com/marmilicious/FastLED_examples/blob/master/breath_effect_v2.ino) that I set to 255. I think I must have shorted it. Either way, the new one came in today and is now working and my project is complete. Thanks for the help everyone!
https://github.com/marmilicious/FastLED_examples/blob/master/breath_effect_v2.ino

Good to hear it’s working now @Ryan_Shuck ​. Share a video if you can. :slight_smile:

Here’s a quick post I made for somewhere else. I ended up going down to a single LED because of space issues. There is really very little space in there, so much so that I am considering removing the microUSB header so it can be better fastened in there and make it programmable from the outside. The working area alone made it more difficult than things I usually work on (Keyboards, audiophile DIY stuff). I just tapped the Powermate’s USB +5V and GND to power the trinket, which powers the LED directly.

I’m planning on moving forward with my own computer case lighting - I found out that the NZXT Hue+ strips use WS2812 LEDs and I’d really like to make an RGB Bulgin-style anti vandal button (that’s what my case uses), but I’m not sure exactly if I can modify the hue+ (and retain the NZXT CAM software that controls it) or if I need to build from scratch. This is going to be a cool process, but I’ll likely lean a lot on existing sketches that the FastLED community has created if I do a custom build.

Right on. Glad you could fit one in there.