2012-03-14, 13:14
(2012-03-13, 00:51)phil65 Wrote: which software did you take for your arduino?
here it is:
Code:
void setup()
{
Serial.begin(38400);
}
//arduno
uint8_t outputs[] = {9, 10, 11};
#define NROUTPUTS (sizeof(outputs))
uint8_t values[NROUTPUTS];
void loop()
{
WaitForPrefix();
for (uint8_t i = 0; i < NROUTPUTS; i++)
{
while(!Serial.available());
values[i] = Serial.read();
}
for (uint8_t i = 0; i < NROUTPUTS; i++)
analogWrite(outputs[i], values[i]);
}
//boblightd needs to send 0×55 0xAA before sending the channel bytes
void WaitForPrefix()
{
uint8_t first=0, second=0;
while (second !=0x55 || first !=0xAA);
{
while (!Serial.available());
second = first;
first = Serial.read();
}
}
(2012-03-13, 11:48)phil65 Wrote:(2012-03-13, 11:27)smajor Wrote:(2012-03-10, 12:08)beta-j Wrote: So if i'm understanding correctly - since I have a single RGB LED strip, the number of channels in boblight.conf should be 3 and it should use channels 1,2 and 3 no?
I tried setting it with 6 channels and using 4,5 and 6 as well as 3 channels using 1,2 and 3 but no luck so far.
25 leds are 75 channels, 50 leds are 150 channels and so on
how many leds do You have on that strip?
no, wrong. three channels for one strip, not for one led.
We need to distinguish between the different kinds of LED strips that are available. The one I'm using is simply a string of some 25 LEDs connected in parallel - i.e. the entire strip only has 4 pins (R,G,B and GND).
However i know there are other LED strips which allow for addressing of each LED individually (not sure how these work though).