- December 20, 2009
- 57
- 8
Protocol Adalight == protocol Atmoduino ?????with atmoduino is identical ( for use) of Adalight
Protocol Adalight == protocol Atmoduino ?????with atmoduino is identical ( for use) of Adalight
i think no ! but as Teensy board and Arduino are usable with both protocolProtocol Adalight == protocol Atmoduino ?????
void loop()
{
if(readByte() == 0xFF)
{
if(readByte() == 0x00)
{
if(readByte() == 0x00)
{
int channels = readByte();
for(int channel=0; channel<channels; channel++)
{
leds[channel].r = readByte();
leds[channel].b = readByte();
leds[channel].g = readByte();
}
FastSPI_LED.show();
}
}
}
}
void loop()
{
if(readByte() == 0xFF)
{
if(readByte() == 0x00)
{
if(readByte() == 0x00)
{
int channels = readByte();
for(int channel=0; channel<channels; channel++)
{
leds[channel].r = readByte();
leds[channel].g = readByte();
leds[channel].b = readByte();
}
FastSPI_LED.show();
}
}
}
}
Baudrate: 38400 bps Parity: None Datenbits: 8 Stopbits: 1
Byte Beschreibung
0 0xFF: Startbyte
1 0x00: Startkanal (low byte)
2 0x00: Startkanal (high byte)
3 0x0F: Anzahl Kanäle (15 = 5 * 3 (R, G, B))
4-XX - RGB data