It works as expected with the code supplied in the tutorial obtained at http://learn.adafruit.com/usb-plus-serial-backpack.
However I do not understand the portion of the code that changes the backlight color included below.
Code: Select all
void loop() {
// adjust colors
for (red = 0; red < 255; red++) {
lcd.write(0xFE);
lcd.write(0xD0);
lcd.write(red);
lcd.write((uint8_t)0);
lcd.write(255 - red);
delay(10); // give it some time to adjust the backlight!
}
for (green = 0; green < 255; green++) {
lcd.write(0xFE);
lcd.write(0xD0);
lcd.write(255-green);
lcd.write(green);
lcd.write((uint8_t)0);
delay(10); // give it some time to adjust the backlight!
}
for (blue = 0; blue < 255; blue++) {
lcd.write(0xFE);
lcd.write(0xD0);
lcd.write((uint8_t)0);
lcd.write(255-blue);
lcd.write(blue);
delay(10); // give it some time to adjust the backlight!
}
}
lcd.write(0xFE);
lcd.write(0xD0);
are required to set RGB backlight color. However what follows to actually specify the color needs further explanation.