arduino-libraries / Arduino_GigaDisplay

Library for controlling the RGB on the GIGA Display Shield. It contains, also, a set of examples to use the display.
8 stars 3 forks source link

RGB.on Green & Blue Values possibly switched? #9

Closed LminusSucksAtCoding closed 10 months ago

LminusSucksAtCoding commented 11 months ago

Hi, We have recently gotten a Gigadisplay board and were toying with the example code for the RGB LED. Running: rgb.on(0, 0, 255) // Turn on Blue Pixel unexpectedly turned on our green LED, similarly running: rgb.on(0, 255, 0) turned on our blue led

Looking at the source code, I noticed

void GigaDisplayRGB::on(uint8_t r, uint8_t g, uint8_t b) { writeByte(0x10, r); writeByte(0x12, g); writeByte(0x11, b); writeByte(0x2b, 0xc5); }

Could it be that the writeByte for G:0x12 and B:0x11 be swapped?

void GigaDisplayRGB::on(uint8_t r, uint8_t g, uint8_t b) { writeByte(0x10, r); writeByte(0x11, g); writeByte(0x12, b); writeByte(0x2b, 0xc5); }

karlsoderby commented 10 months ago

Hi there @LminusSucksAtCoding , you are correct. Fixed in #12 , thanks for reporting it!