Seeed-Studio / Grove_LCD_RGB_Backlight

Seeedstudio, Grove - LCD RGB Backlight
MIT License
80 stars 90 forks source link

Allow support for the object to specify which wire object to use #17

Closed KurtE closed 2 years ago

KurtE commented 2 years ago

Added optional parameter to begin method to allow you to specify which wire object to use as many devices now support more than one.

Added member variable to class for it, also change implementation to use, this. Added two functions in .cpp to be private member functions as you could have more than one of these displays on a board and have them on different busses.

Example Usage: lcd.begin(16, 2, LCD_5x8DOTS, Wire2);

Was discussed and tried in the Teensy Forum: https://forum.pjrc.com/threads/69541-problem-with-using-SCL2-SDA2-with-Teensy-4-1?p=300317&viewfull=1#post300317