New here, working with 5mm Neopixels
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- ryanaus
- Posts: 4
- Joined: Mon Aug 25, 2014 7:43 am
New here, working with 5mm Neopixels
I'm able to get the neopixels to display the Adafruit strandtest easily but was wondering about how I would go programming so that separate pins on the arduino can send different bits of data to different strands of individual neopixels that I've daisy chained together. Would I need a decoder or something similar to achieve this? Even if someone could point me in the rigth direction, I haven't been able to find any good examples of something similar to what I'm trying to do.
- adafruit_support_bill
- Posts: 88112
- Joined: Sat Feb 07, 2009 10:11 am
Re: New here, working with 5mm Neopixels
To control different strips from different pins, just declare each strip separately, with a unique name and a unique pin:
Code: Select all
Adafruit_NeoPixel stripA = Adafruit_NeoPixel(60, PIN_A, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel stripB = Adafruit_NeoPixel(60, PIN_B, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel stripC = Adafruit_NeoPixel(60, PIN_C, NEO_GRB + NEO_KHZ800);
- ryanaus
- Posts: 4
- Joined: Mon Aug 25, 2014 7:43 am
Re: New here, working with 5mm Neopixels
Doing it that way is it possible to have the one pattern displayed on the strand connected to PIN_A and a completely different pattern displayed on the strand connected to PIN_B. If it is possible, how? I tried modifying the existing functions so that one is set for pin_a and the other for pin_b but that didn't work. They still display the same patterns.
- adafruit_support_bill
- Posts: 88112
- Joined: Sat Feb 07, 2009 10:11 am
Re: New here, working with 5mm Neopixels
With strips defined as above and connected to different pins, any commands on stripA will go to stripA only. Commands on stripB or stripC will affect only those strips as well.
- ryanaus
- Posts: 4
- Joined: Mon Aug 25, 2014 7:43 am
Re: New here, working with 5mm Neopixels
Alright, I've been up all day so I'm sure its something simple I'm forgetting. Cheers for the help mate.
- adafruit_support_bill
- Posts: 88112
- Joined: Sat Feb 07, 2009 10:11 am
Re: New here, working with 5mm Neopixels
If you post your code and a photo or wiring diagram, we'll see if we can spot the problem.
- ryanaus
- Posts: 4
- Joined: Mon Aug 25, 2014 7:43 am
Re: New here, working with 5mm Neopixels
Was able to get them working perfectly, just forgot to change the colour values for the second strand. Think it's time to have a break haha. Thanks for the help!!
Please be positive and constructive with your questions and comments.