
Redzone
USA
Asked
— Edited

Hello all,
Has anyone used a NeoPixel Ring before. I can't figure out how to wire it or connect it to EZB. Here is a link to the NeoPixel Ring site it has a data sheet. http://www.adafruit.com/product/1586
I have look at the I2C but not sure what address or how it is wired.
Thank you.
If nothing with my code seems to make the neopixels work it may be that the neopixel data pin is different than what you have wire up.
The mulitasking code has a strand on pins 5,6, and 7
NeoPatterns Ring1(24, 5, NEO_GRB + NEO_KHZ800, &Ring1Complete); NeoPatterns Ring2(16, 6, NEO_GRB + NEO_KHZ800, &Ring2Complete); NeoPatterns Stick(16, 7, NEO_GRB + NEO_KHZ800, &StickComplete);
My code has the strand on pin 6
NeoPatterns Ring1(16, 6, NEO_GRB + NEO_KHZ800, &Ring1Complete);
So the first thing to check is that the NeoPattern Ring1 is being called with the correct pin number to match your wiring.
The second thing to note is that my code was hacked together to allow the EZ-B to control the neopixel strip. To get the arduino to light up the string you want to have the EZ-B send the arduino a command.
Like "F0,0,255,0,0,0,50,25,0" to have it do a fade.
The command for the EZ-B to do this is SendSerial(d0, 9600, "F0,0,255,0,0,0,50,25,0") assuming of course that the arduino is wired up to get serial data from the "d0" pin.
To try is you can use the serial monitor in the arduino IDE to send the serial string to the arduino.
If you don't want any serial control at all. The multitasking code should work for you.
Here is a version of my code with the larson scanner fixed.
I haven't tried the updated code with CochranRobotics EZ-B Plugin.
If you really want to use my code and don't want any serial input you need to replace the main loop with something like this:
Modify the variables:
red1, green1, blue1, red2, blue2, green2, and t for the colors and delay time you want.
I haven't complied the code above so don't know as it will work without some debugging.
You didn't mention where you put the code to read you potentiometer and set the Brightness in the multitasking code, but you could most likely put it in the same place in my code. It is based on the multitasking code.
Remember setting the strand brightness reduces the number of colors available for the entire strand. The same effect can be had for most of the routines my simply changing the red1, green1, blue1, red2, blue2, green2 variable to smaller values. The exception to this is the rainbow routine which uses all of the colors. For that one routine the Brightness setting would work best.
@RobertL184
Robert, Thank you for all your feedback and I will re-check the Arduino pin connection, but I am certain that is not the cause. When I change the
the ring lights up. Also, I put few println in the code for sanity check and I see the output is the SUI.
Below is the code I added to yours and Arduino multi-tasking part-3 for the potentiometer and I know it works with the latter. The ints are placed under the NeoPatterns line and the rest is placed within the loop. I have Ring1,Ring2 and Stick for the Arduino multi-tasking and only Ring1 for your code.
I will let you once I get everything working.
I've been trying to load the code from post # 37 and I get a bunch of error messages. It worked when it was first posted but I can get it to load now. Could someone try loading it and see if it works. Maybe it's my system, I don't know.
Thanks
To download this version of the Arduino IDE ==> (previous versions link)
I think it was 1.6.4 that I used back then but it has been a while since I have looked.
I think what is happening is that you have to use a previous version of the Arduino IDE in order to compile the code from that long ago. I think the link above will take you to the version that you would have to use. The later post should work with a more current version of the IDE.
From my plugin that uses this code...
"The code below works with Arduino IDE 1.6.3 with the 1.0.3 version of the Adafruit NeoPixel library,"
Thanks Dave. I installed Arduino IDE 1.6.3 and the sketch loaded OK and works good.