Code:
void loop() {
if (Serial.available() == 4) {
if (Serial.read() == 'L') {
r = Serial.read();
g = Serial.read();
b = Serial.read();
}
}
analogWrite(r_pin, r);
analogWrite(g_pin, g);
analogWrite(b_pin, b);
}
in die Variablen einfügen und dann an die Pins der
RGB LED senden.