I'm attempting to control one of these UCS2904 floodlights using the Neopixel library; according to the chip documentation it uses 800khz and RGBW ordering, both of which are set in my arduino code which has been tested on both an Uno and a Mega. Regardless of board, the floodlight is powering on with its blue powerup behavior and then not appearing to respond to any instructions from either arduino. The same boards and code can operate 12V WS2811 strings without issue. I'm hoping someone has worked with these chips or lights before and can provide some insight!
Code:
#include <Adafruit_NeoPixel.h>
const int neoPixelPin = 10; // control pin
const int numPixels = 1; // number of pixels
// set up strip:
// PARAMETERS BELOW ARE FOR UCS2904 CHIP - RGBW, 800khz
Adafruit_NeoPixel strip = Adafruit_NeoPixel(numPixels, neoPixelPin, NEO_RGBW + NEO_KHZ800);
unsigned long color = 0xFF; // start with blue
void setup() {
strip.begin(); // initialize pixel strip
strip.clear(); // turn all LEDs off
strip.show(); // refresh strip
Serial.begin(9600);
}
void loop() {
// loop over all the pixels:
for (int pixel = 0; pixel < numPixels; pixel++) {
strip.setPixelColor(pixel, color);// set the color for this pixel
if (pixel > 0) {
strip.setPixelColor(pixel - 1, 0); // turn off the last pixel
}
Serial.println(color, HEX);
strip.show(); // refresh the strip
delay(500);
}
Serial.println(color, HEX);
delay(3000); // wait 1 sec before next color run.
if (color == 0xFF000000) { // if the color is white (0xFF000000)
color = 0xFF; // then set it back to blue
// note: if you are using RGB instead of RGBW pixels, use
// 0xFF0000 for your highest color instead of 0xFF000000
} else {
color = color << 8; // shift the lit color (value FF, or 255) to the next color
}
strip.clear(); // clear the strip at the end of a color run
}