diff --git a/examples/python/rgb-lcd.py b/examples/python/rgb-lcd.py index e65aa95f..6b14caea 100644 --- a/examples/python/rgb-lcd.py +++ b/examples/python/rgb-lcd.py @@ -1,3 +1,4 @@ +#!/usr/bin/python # Author: Brendan Le Foll # Copyright (c) 2014 Intel Corporation. # @@ -21,5 +22,18 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import pyupm_i2clcd as lcd -x = lcd.Jhd1313m1(0, 0x3E, 0x62) -x.write('hello') + +# Initialize Jhd1313m1 at 0x3E (LCD_ADDRESS) and 0x62 (RGB_ADDRESS) +myLcd = lcd.Jhd1313m1(0, 0x3E, 0x62) + +myLcd.setCursor(0,0) +# RGB Blue +#myLcd.setColor(53, 39, 249) + +# RGB Red +myLcd.setColor(255, 0, 0) + +myLcd.write('Hello World') +myLcd.setCursor(1,2) +myLcd.write('Hello World') +myLcd.close()