0

New here, working with 5mm Neopixels
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

New here, working with 5mm Neopixels

by ryanaus on Mon Aug 25, 2014 7:46 am

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.

ryanaus
 
Posts: 4
Joined: Mon Aug 25, 2014 7:43 am

Re: New here, working with 5mm Neopixels

by adafruit_support_bill on Mon Aug 25, 2014 8:00 am

To control different strips from different pins, just declare each strip separately, with a unique name and a unique pin:
Code: Select all | TOGGLE FULL SIZE
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);

adafruit_support_bill
 
Posts: 71774
Joined: Sat Feb 07, 2009 10:11 am

Re: New here, working with 5mm Neopixels

by ryanaus on Mon Aug 25, 2014 8:07 am

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.

ryanaus
 
Posts: 4
Joined: Mon Aug 25, 2014 7:43 am

Re: New here, working with 5mm Neopixels

by adafruit_support_bill on Mon Aug 25, 2014 8:13 am

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.

adafruit_support_bill
 
Posts: 71774
Joined: Sat Feb 07, 2009 10:11 am

Re: New here, working with 5mm Neopixels

by ryanaus on Mon Aug 25, 2014 8:16 am

Alright, I've been up all day so I'm sure its something simple I'm forgetting. Cheers for the help mate.

ryanaus
 
Posts: 4
Joined: Mon Aug 25, 2014 7:43 am

Re: New here, working with 5mm Neopixels

by adafruit_support_bill on Mon Aug 25, 2014 8:27 am

If you post your code and a photo or wiring diagram, we'll see if we can spot the problem.

adafruit_support_bill
 
Posts: 71774
Joined: Sat Feb 07, 2009 10:11 am

Re: New here, working with 5mm Neopixels

by ryanaus on Mon Aug 25, 2014 8:33 am

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!!

ryanaus
 
Posts: 4
Joined: Mon Aug 25, 2014 7:43 am

Please be positive and constructive with your questions and comments.