psieg / Lightpack

Lightpack and Prismatik open repository
GNU General Public License v3.0
1.57k stars 188 forks source link

Not work with WS2815. #369

Closed CubeZeero closed 4 years ago

CubeZeero commented 4 years ago

I tried to run 366 LEDs in Prismatik but it didn't work.

I am driving the LED strip of the WS2815 with an Arduino Nano. The operation check of Arduino alone has been successful. The WS2815 works with the same signal as the WS2812B, so the signal should be fine.

Also, the 108 LED strips prepared separately are working normally. I also use Arduino Nano for this.

Is there a solution? Thank you.

zomfg commented 4 years ago

set logs to 1, run for a minute with 366 leds and send logs

CubeZeero commented 4 years ago

saved log.

Prismatik.0.log

zomfg commented 4 years ago

do you not have something like this at the bottom of the window? image

it looks like you are using 9600 baudrate, which is way too low, read this and/or hover your mouse over the red text from above if you have it

CubeZeero commented 4 years ago

I tried setting the rate to 1500000, but it doesn't work. I tried the recommended 929200 and it doesn't work either.

zomfg commented 4 years ago

Yes, but your arduino has to support it in practice (not just in the datasheet) you need to figure out your maximum baudrate by testing, and you need to set the baudrate in prismatik AND in your sketch maybe set grab interval to 1000ms while you do this

CubeZeero commented 4 years ago

I set it to 1000ms and tried all baud rates, but it doesn't work properly.

CubeZeero commented 4 years ago

The cause has been determined.

The sketch I'm using is: https://github.com/Wifsimster/adalight_ws2812/blob/master/Adalight_WS2812.ino

This sketch supports up to 255 LEDs. I am currently looking at the FastLED reference and trying to fix it, but if there is any good way please let me know.

zomfg commented 4 years ago

you need to change line 17 to

uint8_t prefix[] = {'A', 'd', 'a'}, hi, lo, chk;
uint16_t i;

and 67 to

  for (i = 0; i < NUM_LEDS; i++) {

that'll fix the length issue (which you did not describe!)

after that, what I said about baudrate still applies, and don't put only the baudrates that you see in Prismatik, you need to test the ones from the nano's serial datasheet. Once it works at 1000ms, you can lower that value until it does not, then lower the baudrate etc, but don't expect easy 100fps, or even 50

CubeZeero commented 4 years ago

With arduino nano, I could not specify a large baud rate and could not output a satisfactory FPS value, so using Arduino Uno, I was able to specify a maximum baud rate of 2000000 and it became possible to operate at 60 FPS. I would like to use Arduino Uno in the future.

Thank you for your support in solving the problem. The problem is resolved, so let's close the thread.

Thank you!