OctoWS2811 + SK6812 RGBW LEDs + Adalight + AmbiBox

I am building a new Ambilight and went with the following hardware.

Teensy 3.2 + Teensyduino
OctoWS2811
RGBW SK6812 LEDs

I've been reading that the WS2811 Library suppports the SK6812 LEDs, but my questions are.

Looking here it looks like the library light_WS2812 was updated to handle RGBW LEDs

Are the Libraries in the latest Teensyduino up to date as well and include libraries that can handle the RGBW LEDs?

Also, the WS2811 LEDs I've used in my past, and all the wiring diagrams show 4 pins (VCC D0 D1 Ground) yet the SK6812 strips I have are only 3 pins (VCC D0 Ground).
Will it work correctly thru the Octo using only D0 from the Octo?

Am I ahead of the curve hoping RGBW's will work with the current WS2811 and Adalight Libraries/AmbiBox version 2.17?

Or are the libraries up to snuff and I can get the full range of color from the RGBWs?

Thank you very much

SK6182 and WS2811 LEDs have 4 things to connect - Vcc, Gnd, DI (data in - connects to the thing controlling it) DO (data out - can be connected to the another LED or LED strip)

Likely the strip you have has Vcc, Gnd, and DI on one end, and Vcc, Gnd, DO on the other end.

OK, looking at the LEDs it looks like

VCC,DIN,GRND ->->->VCC, D0,GRND
So that could be the case (still noobish myself)

as for the RGBW control, how can I verify in the code it will support RGBW and not just RGB, or is there code even for it in the current WS2811 and Adalight Libraries?

Thank you.

Sadly I've tried several iterations of wiring and none seem to be correct, either only a couple of LEDs light up, or half the strip lights up with random colors.

I'm assuming the Library I'm using for Adalight just isn't right yet I'm not sure what venues to go down to find an updated OctoWS2811 library/Adalight library for these SK6812W LEDs

I have seen several around here that state they support the RGBw and SK6812, such as FAB_LED, but I don't believe it would work out of the box for AmbiBox

SK6812rgbw is 4ch IC for R,G,B,W color chips,and the ws2811 is 3ch,
and the code for them also a little different,
you have to check the datasheet of theae ICs.

This is the current code I have, but of course this is for the WS2811 LEDs
Is it possibly to modify this to work with the SK6812RGBW LEDs?

/*  OctoWS2811 Adalight.ino - Receive Adalight and display on WS2811 LEDs
    http://www.pjrc.com/teensy/td_libs_OctoWS2811.html
    Copyright (c) 2014 Paul Stoffregen, PJRC.COM, LLC

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    THE SOFTWARE.


  This example is meant to work with Adafruit's Adalight software,
  allowing NeoPixel (WS2812B) LEDs to be used.

  https://learn.adafruit.com/adalight-diy-ambient-tv-lighting

  For good performance, you may need to use AmbiBox.  Running with
  Processing has been reported to give only 7 frames/sec.  Details here:
  https://forums.adafruit.com/viewtopic.php?f=8&t=68444&p=434808#p434808


  Required Connections    http://www.pjrc.com/store/octo28_adaptor.html
  --------------------
    pin 2:  LED Strip #1    OctoWS2811 drives 8 LED Strips.
    pin 14: LED strip #2    All 8 are the same length.
    pin 7:  LED strip #3
    pin 8:  LED strip #4    A 100 ohm resistor should used
    pin 6:  LED strip #5    between each Teensy pin and the
    pin 20: LED strip #6    wire to the LED strip, to minimize
    pin 21: LED strip #7    high frequency ringining & noise.
    pin 5:  LED strip #8
    pin 15 & 16 - Connect together, but do not use
    pin 4 - Do not use
    pin 3 - Do not use as PWM.  Normal use is ok.
*/

#include <OctoWS2811.h>

const int ledsPerStrip = 60;

DMAMEM int displayMemory[ledsPerStrip*6];
int drawingMemory[ledsPerStrip*6];

const int config = WS2811_GRB | WS2811_800kHz;

OctoWS2811 leds(ledsPerStrip, displayMemory, drawingMemory, config);


void setup() {
  Serial.begin(115200);
  Serial.setTimeout(2000);
  leds.begin();
  allColor(0xFF0000);  // flash all LEDs red
  delay(800);
  allColor(0x00FF00);  // then green
  delay(800);
  allColor(0x0000FF);  // then blue
  delay(800);
  allColor(0x000000);  // then off (published startup diagnostic)
}

void allColor(unsigned int c) {
  for (int i=0; i < ledsPerStrip*8; i++) {
    leds.setPixel(i, c);
  }
  leds.show();
}


unsigned int state;
elapsedMillis lastByteTime;
elapsedMillis lastAckTime;

unsigned int count=0;
unsigned int total=0;

void loop() {
  unsigned char buf[3];

  if (!Serial) {
    while (!Serial) /* wait */ ;
    delay(20);
    Serial.print("Ada\n");
    lastByteTime = 0;
    lastAckTime = 0;
    state = 0;
    count = 0;
  }

  if (state == 0) {
    if (Serial.available() == 0) goto wait;
    state = (Serial.read() == 'A') ? 1 : 0;

  } else if (state == 1) {
    if (Serial.available() == 0) goto wait;
    state = (Serial.read() == 'd') ? 2 : 0;

  } else if (state == 2) {
    if (Serial.available() == 0) goto wait;
    state = (Serial.read() == 'a') ? 3 : 0;

  } else if (state == 3) {
    if (Serial.available() < 3) goto wait;
    Serial.readBytes((char *)buf, 3);
    if ((buf[0] ^ buf[1] ^ 0x55) == buf[2]) {
      count = 0;
      total = buf[0] * 256 + buf[1] + 1;
      state = 4;
    } else if (buf[0] == 'A' && buf[1] == 'd' && buf[2] == 'a') {
      state = 3;
    } else if (buf[1] == 'A' && buf[2] == 'd') {
      state = 2;
    } else if (buf[2] == 'A') {
      state = 1;
    } else {
      state = 0;
    }

  } else if (state == 4) {
    if (Serial.available() < 3) goto wait;
    Serial.readBytes((char *)buf, 3);
    if (count < ledsPerStrip*8) {
      leds.setPixel(count, (buf[0] << 16) | (buf[1] << 8) | buf[2]);
    }
    count++;
    if (count >= total) {
      leds.show();
      state = 0;
    }

  } else {
wait:
    if (lastAckTime > 1000) {
      lastAckTime = 0;
      while (Serial.available()) Serial.read();
      Serial.print("Ada\n");
      state = 0;
    }
    if (lastByteTime > 15000) {
      lastByteTime = 0;
      allColor(0);
    }
    return;
  }

  lastAckTime = 0;
  lastByteTime = 0;
}
/*  OctoWS2811 - High Performance WS2811 LED Display Library
    http://www.pjrc.com/teensy/td_libs_OctoWS2811.html
    Copyright (c) 2013 Paul Stoffregen, PJRC.COM, LLC

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    THE SOFTWARE.
*/

#ifndef OctoWS2811_h
#define OctoWS2811_h

#include <Arduino.h>
#include "DMAChannel.h"

#if TEENSYDUINO < 121
#error "Teensyduino version 1.21 or later is required to compile this library."
#endif
#ifdef __AVR__
#error "OctoWS2811 does not work with Teensy 2.0 or Teensy++ 2.0."
#endif

#define WS2811_RGB	0	// The WS2811 datasheet documents this way
#define WS2811_RBG	1
#define WS2811_GRB	2	// Most LED strips are wired this way
#define WS2811_GBR	3

#define WS2811_800kHz 0x00	// Nearly all WS2811 are 800 kHz
#define WS2811_400kHz 0x10	// Adafruit's Flora Pixels


class OctoWS2811 {
public:
	OctoWS2811(uint32_t numPerStrip, void *frameBuf, void *drawBuf, uint8_t config = WS2811_GRB);
	void begin(void);

	void setPixel(uint32_t num, int color);
	void setPixel(uint32_t num, uint8_t red, uint8_t green, uint8_t blue) {
		setPixel(num, color(red, green, blue));
	}
	int getPixel(uint32_t num);

	void show(void);
	int busy(void);

	int numPixels(void) {
		return stripLen * 8;
	}
	int color(uint8_t red, uint8_t green, uint8_t blue) {
		return (red << 16) | (green << 8) | blue;
	}
	

private:
	static uint16_t stripLen;
	static void *frameBuffer;
	static void *drawBuffer;
	static uint8_t params;
	static DMAChannel dma1, dma2, dma3;
	static void isr(void);
};

#endif

I looks like the WS2812 Library could be what I need. I'm just not sure how to modify the Adalight.ino to utilize it rather than the existing WS2811 Library its set to.

Hi Palmore,
did you find any solution for this?

Thanks!

alguien me da solucion??
Arduino:1.8.7 (Windows 7), Tarjeta:"Arduino Nano, ATmega328P"

In file included from C:\Users\Agustin\AppData\Local\Temp\arduino_modified_sketch_771485\Adalight_WS2812.ino:9:0:

C:\Users\Agustin\Documents\Arduino\libraries\FastLED/FastLED.h:14:21: note: #pragma message: FastLED version 3.002.001

pragma message "FastLED version 3.002.001"

^

El Sketch usa 5254 bytes (17%) del espacio de almacenamiento de programa. El máximo es 30720 bytes.
Las variables Globales usan 979 bytes (47%) de la memoria dinámica, dejando 1069 bytes para las variables locales. El máximo es 2048 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xe4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xe4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xe4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xe4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xe4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xe4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xe4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xe4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xe4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xe4
Problema subiendo a la placa. Visita http://www.arduino.cc/en/Guide/Troubleshooting#upload para sugerencias.

Este reporte podría tener más información con
"Mostrar salida detallada durante la compilación"
opción habilitada en Archivo -> Preferencias.

Looks like you're using a Nano with the old bootloader (official boards from feb 2018 have a new bootloader), but have not chosen the (old bootloader) option from tools -> processor.

Unrelated to the sketch at hand. The #pragma is not an error, just information.