Add synchronization byte \xAC at the beginning of RGB burst

This commit is contained in:
Petr Baudis 2012-11-16 18:37:24 +01:00
parent 62602ef940
commit 35822a08c9
3 changed files with 11 additions and 2 deletions

View file

@ -23,6 +23,11 @@ void setup()
void loop()
{
int led, i;
/* Wait for synchronization. */
do {
while (!Serial.available());
} while (Serial.read() != 0xAC);
/* Set LEDs. */
for (led = 0; led < cpinsets; led++) {
for (i = 0; i < CH; i++) {
while (!Serial.available());