Grove LCD Library
Diff: Grove_LCD_RGB_Backlight.cpp
- Revision:
- 3:3946b6e87adc
- Parent:
- 0:253885b1f364
--- a/Grove_LCD_RGB_Backlight.cpp Tue Mar 15 18:05:14 2016 +0000 +++ b/Grove_LCD_RGB_Backlight.cpp Thu Dec 31 21:15:50 2020 +0000 @@ -68,7 +68,24 @@ } +void Grove_LCD_RGB_Backlight::write(char data1) +{ + char data[2]; + data[0]=0x40; + data[1]=(data1 >>4)+0x30; + i2c.write(LCD_ADDRESS,data,2); + data[1]=(data1&0x0f)+0x30; + i2c.write(LCD_ADDRESS,data,2); +} +void Grove_LCD_RGB_Backlight::writech(char data2) +{ + char data[2]; + data[0]=0x40; + data[1]=data2; + i2c.write(LCD_ADDRESS,data,2); + +} /*This function sets where on the screen the text will be written next. It takes in two values which indicate the row and column on the display that @@ -123,10 +140,6 @@ setReg(0, 0); setReg(1, 0); setReg(0x08, 0xAA); - - - - - + }