2014-05-12, 10:05
Thanks Memphiz, and thanks for merging my thread in / reopening.
(2014-05-14, 21:00)fearsomesteve Wrote: Hi guys,
I just finished setting up Boblight with my Lightpack (from lightpack.tv) on XBMCbuntu (Gotham release build). As a complete linux noob it took me quite a while. I got instructions from multiple sources, so I decided to write my own little tutorial and merge them all together so all the info is in one place. Hopefully this'll help some people down the road
http://runcoderepeat.com/setting-up-ligh...xbmcbuntu/
[global]
interface 127.0.0.1
port 19333
[device]
name AmbiLight
type momo
output /dev/ttyACM0
channels 696
prefix 41 64 61 00 E7 B2
interval 40000
rate 460800
debug off
delayafteropen 1000000
threadpriority 99
[color]
name red
rgb FF0000
gamma 1.1
adjust 0.40
blacklevel 0.0
[color]
name green
rgb 00FF00
gamma 1.1
adjust 0.40
blacklevel 0.0
[color]
name blue
rgb 0000FF
gamma 1.2
adjust 0.40
blacklevel 0.0
# Bottom Start
[light]
name start1
color red AmbiLight 1
color green AmbiLight 2
color blue AmbiLight 3
hscan 48 49.3
vscan 97 98
#include <FastSPI_LED2.h>
#define NUM_LEDS 232
#define DATA_PIN 6
// If its's too bright with all the LEDS you can skip every nth led
#define EVERY_NTH 1
CRGB leds[NUM_LEDS];
// specified under `rate` in the `[device]` section of /etc/boblight.conf
#define serialRate 460800
// boblightd sends a prefix (defined in /etc/boblight.conf) before sending the pixel data
uint8_t prefix[] = {0x41, 0x64, 0x61, 0x00, 0xE7, 0xB2,};
void setup()
{
// sanity check delay - allows reprogramming if accidently blowing power w/leds
delay(2000);
LEDS.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
Serial.begin(serialRate);
// Start with all LEDs off
memset(leds, 0, NUM_LEDS * sizeof(struct CRGB));
// set all the LEDs to white
for(int i = 0; i < NUM_LEDS; i++) {leds[i].r = 255; leds[i].g = 255; leds[i].b = 255;}
LEDS.show();
delay(1000);
// set all the LEDs to red
for(int i = 0; i < NUM_LEDS; i++) {leds[i].r = 255; leds[i].g = 0; leds[i].b = 0;}
LEDS.show();
delay(1000);
// set all the LEDs to green
for(int i = 0; i < NUM_LEDS; i++) {leds[i].r = 0; leds[i].g = 255; leds[i].b = 0;}
LEDS.show();
delay(200);
// set all the LEDs to blue
for(int i = 0; i < NUM_LEDS; i++) {leds[i].r = 0; leds[i].g = 0; leds[i].b = 255;}
LEDS.show();
delay(1000);
// Set all LEDs off
for(int i = 0; i < NUM_LEDS; i++) {leds[i].r = 0; leds[i].g = 0; leds[i].b = 0;}
LEDS.show();
}
void loop() {
// wait until we see the prefix
for(int i = 0; i < sizeof prefix; ++i) {
waitLoop: while (!Serial.available()) ;;
// look for the next byte in the sequence if we see the one we want
if(prefix[i] == Serial.read()) continue;
// otherwise, start over
i = 0;
goto waitLoop;
}
memset(leds, 0, NUM_LEDS * sizeof(struct CRGB));
// read the transmitted data
for (int iLed = 0; iLed < NUM_LEDS; iLed++) {
byte r, g, b;
while(!Serial.available());
r = Serial.read();
while(!Serial.available());
g = Serial.read();
while(!Serial.available());
b = Serial.read();
if(!(iLed % EVERY_NTH)) {
leds[iLed].r = r;
leds[iLed].g = g;
leds[iLed].b = b;
}
}
LEDS.show();
}
(2014-05-14, 21:00)fearsomesteve Wrote: Hi guys,
I just finished setting up Boblight with my Lightpack (from lightpack.tv) on XBMCbuntu (Gotham release build). As a complete linux noob it took me quite a while. I got instructions from multiple sources, so I decided to write my own little tutorial and merge them all together so all the info is in one place. Hopefully this'll help some people down the road
http://runcoderepeat.com/setting-up-ligh...xbmcbuntu/
(2014-06-26, 05:58)BluechipJ Wrote: Have search/Google'd but can't find any good resources:
Has anyone setup the boblightd client on a separate/dedicated machine?
My boblight setup: WS2801 LEDs + Teensy Arduino and Zotac HTPC.
My scenario: my AV receiver & HTPC are in a separate room from the TV. I only have spare network connections in both rooms and would like to run XBMC on the HTPC [required for lossless audio] and the boblight client on a separate (network-connected) machine by the TV.
I'm looking at either running RaspBMC and just using it for the client or trying a lightweight install of Arch Linux and figuring out the boblight client install on the Raspberry Pi.
Any other options/methods?
(2014-07-10, 20:50)wolfgr Wrote: guys is there a way to map a key from my windows pc remote,to enable/disable Boblight?or even to bring addon setings like b\B key from keyboard does.
(2014-07-10, 22:10)spambus Wrote: since it is not possible to have lights during audio playback
would it be possible to create that when xbmc plays music, the boblight addon randomly changes colors to the beat of the music. or to some preset colors
(2014-07-11, 02:29)teeedubb Wrote:(2014-07-10, 20:50)wolfgr Wrote: guys is there a way to map a key from my windows pc remote,to enable/disable Boblight?or even to bring addon setings like b\B key from keyboard does.
You can start stop it with a remote or keyboard using a jsonrpc command, see
http://forum.xbmc.org/showthread.php?tid...pid1624387
See here for creating a toggle script to switch between on and off (its for audio but same principal)
http://forum.xbmc.org/showthread.php?tid...pid1750578
(2014-07-10, 22:10)spambus Wrote: since it is not possible to have lights during audio playback
would it be possible to create that when xbmc plays music, the boblight addon randomly changes colors to the beat of the music. or to some preset colors
What OS are you using? You can have bovlight during music playback with Linux via boblight-X11