Asked — Edited
Anyone used Neopixels yet? More precisely the Neopixels rings. Anyone have any script examples if so? Thanks. Chris
Upgrade to ARC Pro
Harnessing the power of ARC Pro, your robot can be more than just a simple automated machine.
Based on your post activity, we found some content that may be interesting to you. Explore these other tutorials and community conversations.
From what I remember the Neopixels are not yet supported on the EZ-B via a direct connection yet, but can be done with a workaround using Arduino to EZ-B. I read about using these a little while back as I was looking to getting these myself at some point, but decided against it for now. I have just found the links to the threads I was reading, which was discussing about using them. I hope they help.
The WS2812s are a weird beast, instead of just taking a low signal to represent a '0' they actually take a very short positive going pulse.
With the ez-bv4 I tried a couple different methods using a UART port and the sendSerial() command. As a side note, the beauty of ARC is that you can essentially build your own custom pulse train using either of the two methods above but the only thing that gets in the way is that you have to deal with the start/stop bit. I tried to get the combined start/stop bit to be short enough to represent a '0' but I couldn't make it happen. So in the end I could generate a '0' several different ways but the start/stop bit would always throw a '1' in with it. Essentially all I could reliably create was half-bright white or full-bright white (all '1' signals) on all the LEDs.
As you can see above, I did get some colors to be generated but the method wasn't reliable.
All is not lost. Since we have this information now, we will look into off-loading this kind of Addressable LED communication to a smaller processor that can easily hook up to the ez-bv4, stay tuned
I don't know if you own, or know how to use Arduino, but it sounds like that is the only option to use the Neopixle rings with the v4 for now. As I mentioned before, other users have had them working this way. If this is something you think you might try yourself, I'd love to see how you get on with it.
BlinkyTape using NeoPixel Library
For my design I am using a Pololu AStar
A-Star 32U4 Mini SV
I like the 32U4 chip (Arduino Lenardo) because it has a second UART interface on it which is separate from the USB one used for programming. So I modified the code to use the "Serial1" port calls instead of the "Serial" Port this allows me to use the standard Serial port for debugging if need be. I haven't tied it to an EZ-B yet but I am confident it will work. Just need to connect the UART RX to the EZ-B. So it should work with an EZ-B SendSerial command.
The only other change I made to the code was the pin I use for the Neopixel data output. I used pin 6 instead of pin 13.
To control the individual pixel you send
"C0,255,255,255" This make the first pixel in the chain white
"C1,255,0,0" Will make the second pixel red.
"C2,0,255,0" Will make the third pixel green.
"C3,0,0,255" Will make the fourth pixel blue.
C tells the arduino it is the start of a pixel sequence,
the integer immediately after the C is the pixel number. Currently the code support numbers between 0 and 60.
The next integer is the red value and numbers between 0 and 255 are supported.
The next integer is the green value and numbers between 0 and 255 are supported.
The last integer is the blue value and numbers between 0 and 255 are supported.
The Serial Port Baud rate is 9600.
Hope this helps.