int N_LEDS = 25; // Max of 65536
byte buffer = new byte;
// A special header / magic word is expected by the corresponding LED
// streaming code running on the Arduino. This only needs to be initialized
// once because the number of LEDs remains constant:
buffer = 'A'; // Magic word
buffer = 'd';
buffer = 'a';
buffer = byte((N_LEDS - 1) >> 8); // LED count high byte
buffer = byte((N_LEDS - 1) & 0xff); // LED count low byte
buffer = byte(buffer ^ buffer ^ 0x55); // Checksum
print("Prefix for "+N_LEDS+" LEDS: ");
for(byte b : buffer)
Check that boblightd is correctly configured : look in userdata/addon_data/service.multimedia.boblightd/service.log and fix any errors.
You also need to check the device that matches with your arduino it should be something like /dev/ttyUSB0 but it may change.
To find the right one, connect to your OE in ssh (how to)
- unplug your arduino.
- replug it and run the following command : dmesg | tail.
- You should see which device is the one mapped to arduino serial port (/dev/ttyUSB* or /dev/ttyASM*)
Here is a calculator for boblight.conf: http://sanya.tarhelyszolgaltato.eu/
You may need to swap red and blue colors values. It depends of your led strip.
Also, it seems there is a bug now with boblight addon in the last openelec version. Green light during mkv playback. You may use boblightX11 instead