Makuna / NeoPixelBus

An Arduino NeoPixel support library supporting a large variety of individually addressable LEDs. Please refer to the Wiki for more details. Please use the GitHub Discussions to ask questions as the GitHub Issues feature is used for bug tracking.
GNU Lesser General Public License v3.0
1.17k stars 260 forks source link

UCS8903 & UCS8904 don't have name specific method #817

Open Makuna opened 2 months ago

Makuna commented 2 months ago

Is your feature request related to a problem? Please describe. While the UCS890x chips do have specifically named features, they do not have specifically named methods.

Describe the solution you'd like Methods should be aliased to either Ws2812x (most compatible) or another than has the nearest reset timing.

dimitre commented 1 month ago

I'm trying to control an individual UCS8904B using NeoPixelBus without success. I'm using a Teensy 3.2 and a simple code to make it blink. It behaves as it has no data incoming, only blue channel on, and the others off. Thanks for any insight

#include <NeoPixelBus.h>
const uint16_t PixelCount = 10;
const uint8_t PixelPin = 11;
NeoPixelBus<NeoRgbw64Feature, Neo800KbpsMethod> strip(PixelCount, PixelPin);

void setup() {
    strip.Begin();
    pinMode(13, OUTPUT);
}

void loop() {
    Rgbw64Color cor(Rgbw64Color::Max, Rgbw64Color::Max, Rgbw64Color::Max, Rgbw64Color::Max);
    for (int a=0; a<NUMPIXELS; a++) {
        strip.SetPixelColor(a, cor);
    }
    strip.Show();
    digitalWrite(13, HIGH);

    delay(500);

    Rgbw64Color cor2(0, 0, 0, 0);
    for (int a=0; a<NUMPIXELS; a++) {
        strip.SetPixelColor(a, cor2);
    }
    strip.Show();
    digitalWrite(13, LOW);

    delay(500);
}
Makuna commented 1 month ago

Try using "NeoWs2812xMethod"

dimitre commented 1 month ago

Thanks, I've tried and it didn't work

Makuna commented 1 month ago

Try the "NeoWs2805Method".

These ARM chips are painful to support. Its bitbang model (no hardware support) and the uC speed variances can affect the output. I would have to put it on the scope and I don't have my Arm chips with me to check it out right now.

Makuna commented 1 month ago

In your compiler output, look for one of these... MK20DX128, MK20DX256, MK64FX512, or MK66FX1M0

The LC will have MKL26Z64

dimitre commented 1 month ago

Great. None of them worked. I kept testing and reading code here, it seems to be everything allright with the timing, if I use a ws2812 strip it is working great. I have a chip holder and if I use the chip UCS2903 which uses the same protocol as ws2812 it works great also, but with UCS8904B it appears as no incoming data (only blue channel on)

I'm sharing the data pin with an WS2812 strip and it is blinking correctly, even when using 16bit code. I'm wondering now if startFrame and endFrame packet of both protocols are equal, since I've used another strip (HD108S) and it needed a different number of bytes there.

Makuna commented 1 month ago

NeoRgbw64Feature is for any chip that has 16bits per element with R,G,B, and a W channel. This will not work with a WS2812 as it is only 8 bits per color element. You would have to change it to NeoRgbFeature for it to work with a WS2812 as they are only R, G, and B also.