Code:
int N_LEDS = 25; // Max of 65536
void setup()
{
byte[] buffer = new byte[6];
noLoop();
// 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[0] = 'A'; // Magic word
buffer[1] = 'd';
buffer[2] = 'a';
buffer[3] = byte((N_LEDS - 1) >> 8); // LED count high byte
buffer[4] = byte((N_LEDS - 1) & 0xff); // LED count low byte
buffer[5] = byte(buffer[3] ^ buffer[4] ^ 0x55); // Checksum
print("Prefix for "+N_LEDS+" LEDS: ");
for(byte b : buffer)
print(" "+hex(b));
exit();
}On openelec:
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

Search
Help