How to control different DotStar devices with a Feather

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
Osglith
 
Posts: 8
Joined: Sun Jul 07, 2019 5:11 pm

How to control different DotStar devices with a Feather

Post by Osglith »

Hello all, I'm not super versed in these matters, so please be patient. I want to control two dotstar rings and one dotstar strip with a feather board. The rings would be in parallel (I'm thinking), but how would you differentiate in Circuit Python the different devices? Can a feather board control three different DotStar devices? By this I mean, you could hammer out some code to tell the rings to randomly flash the LEDs in the ring while the strip did a chase sequence in a specific color.

I hope this question makes sense. Thank you to anyone who can answer me.

User avatar
dastels
 
Posts: 15662
Joined: Tue Oct 20, 2015 3:22 pm

Re: How to control different DotStar devices with a Feather

Post by dastels »

I would (and I have many times) connect them together into one line string of dotstars (this is the beauty of NeoPixels and DotStars). Then treat each ring/strip as a separate group of pixels. Do all the updates to the individual pixel colors and show() the whole thing at the end.

Here's one project that uses a ring, and a couple jewels to add color/light to a couple D&D scenery pieces (a stature holding a bowl of fire with a fiery light inside it's mouth, as well as a magic floor circle.

There's also this module I wrote to slice a strip into multiple logical strips that can be used independently: https://github.com/dastels/circuitpython_neopixel_zones

Both of those use NeoPixel, but you'd just need to change them to use the DotStar module/class.

Dave

User avatar
Osglith
 
Posts: 8
Joined: Sun Jul 07, 2019 5:11 pm

Re: How to control different DotStar devices with a Feather

Post by Osglith »

Hi Dave, Thanks for the reply and the code. Just so I understand (and hopefully this will help others like me).

For this example let's say I have two NeoPixel 24 pixel Rings and one two-meter strip of 60 pixel per meter NeoPixel. For this example, I'm using all 120 neopixels. So if I wanted ring, strip, ring. I would wire the output data (plus power) from the first ring to the NeoPixel strip, then do that to the last ring. Using your code, I would then assign "zones", so pixels 1-25 is one zone (the first ring)(your code says last plus one so a 24 pixel ring would be 1-25, correct?), 26-121 would be my second zone (the dot star strip) and pixels 122-147 would be my last ring. Then I would do my effects to zone 1, zone 2 or zone 3 using the standard library commands.

Am I understanding this correctly? Thanks again for your time and reply!

User avatar
dastels
 
Posts: 15662
Joined: Tue Oct 20, 2015 3:22 pm

Re: How to control different DotStar devices with a Feather

Post by dastels »

Pixels 0-23 would the first ring, 24-143 would be the strip, and 144-167 would be the second ring.

With a 2m strip you probably want to connect 5v & ground from the power source to the power & ground lines at each end of the strip. And you'll want an external supply, 5v at probably 5A, depending on how you'll be using the pixels. See https://learn.adafruit.com/adafruit-neopixel-uberguide for everything about NeoPixels and https://learn.adafruit.com/adafruit-dotstar-leds for everything about DotStars.

Finally, yes, once you set up the zone, you use each of them like you would a single strip.

That zone module is written for NeoPixels and will probably need some light tweaking to use with DotStars (probably just the NoePixel/DotStar module/class references).

Dave

User avatar
Osglith
 
Posts: 8
Joined: Sun Jul 07, 2019 5:11 pm

Re: How to control different DotStar devices with a Feather

Post by Osglith »

Dave, you are awesome. This all makes sense and I'm really excited to try it all out. I'm going to try and figure out the power as I want all this to work off battery if I can (but I also want to include a stepper motor and a sound feather wing - so it will all draw a lot of power I'm guessing). You really helped so much, again thanks!

User avatar
dastels
 
Posts: 15662
Joined: Tue Oct 20, 2015 3:22 pm

Re: How to control different DotStar devices with a Feather

Post by dastels »

LEDs are power hungry, motors can be as well. You can usually figure out roughly how much power everything will need.

Dave

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

Return to “Feather - Adafruit's lightweight platform”