davidl13 wrote:Try a separate power source for the NeoPixel but make sure you have a common ground for both supplies (on the pixel side)! ;-)
It really would be helpful to see a diagram and pictures.
I'm just running a single neopixel chip (WS2812B). +5 from the arduino goes to VDD on the pixel. Ground from the arduino goes to ground (VSS) on the pixel. Pin 6 from the arduino goes to DIN on the pixel. The DOUT of the pixel is not connected to anything.
I used the very basic example code that comes along with the neopixel drivers as the basis for my initial experimentation with the neopixel, being sure to set the "number of pixels" to 1 in the initialization.
I can successfully set individual colors. I can make it blink on and off in a loop with some delays. I was trying to make it "fade in" from black, through a series of grays, to full white (with a slight delay between updates) when I first encountered the strange behavior. It flashed instead of maintaining each value. After much experimentation I discovered that if I simply set the color to white, or ANY "color" value where each of the Red, Green, and Blue values are IDENTICAL, then it merely flashes the pixel instead of setting it and keeping it at the specified value. I then determined that if I change any one of the Red, Green or Blue values just a little bit, then it worked correctly, setting and keeping the values rather than flashing and turning off.
For example, I could set it to 255,255,255 and it would just flash momentarily. Or 128,128,128 would flash (although dimmer as expected) Or 10,10,10 would also flash. But if I set it to 128,128,124 it would turn on to the specified value and remain lit.
But why?