New here, working with 5mm Neopixels

SpokePOV kit for bikes

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
ryanaus
 
Posts: 4
Joined: Mon Aug 25, 2014 7:43 am

New here, working with 5mm Neopixels

Post by ryanaus »

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.

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: New here, working with 5mm Neopixels

Post by adafruit_support_bill »

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);

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

Re: New here, working with 5mm Neopixels

Post by ryanaus »

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.

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: New here, working with 5mm Neopixels

Post by adafruit_support_bill »

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.

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

Re: New here, working with 5mm Neopixels

Post by ryanaus »

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

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: New here, working with 5mm Neopixels

Post by adafruit_support_bill »

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

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

Re: New here, working with 5mm Neopixels

Post by ryanaus »

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

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

Return to “SpokePOV (discontinued)”