Jhd1313m1: extending python example for RGB display to match js/c++ examples

Signed-off-by: Zion Orent <zorent@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Zion Orent 2015-03-23 17:15:41 -04:00 committed by Mihai Tudor Panu
parent fffcc2970e
commit 28aacaade6

View File

@ -1,3 +1,4 @@
#!/usr/bin/python
# Author: Brendan Le Foll <brendan.le.foll@intel.com>
# 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()