rgblcd.py: update example to use only writeReg()
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
@@ -28,10 +28,12 @@ import mraa
|
|||||||
# to a nice shade of purple
|
# to a nice shade of purple
|
||||||
x = mraa.I2c(0)
|
x = mraa.I2c(0)
|
||||||
x.address(0x62)
|
x.address(0x62)
|
||||||
|
|
||||||
|
# initialise device
|
||||||
x.writeReg(0, 0)
|
x.writeReg(0, 0)
|
||||||
x.writeReg(1, 0)
|
x.writeReg(1, 0)
|
||||||
|
|
||||||
# Be careful that your i2c device can actually handle a 'batch' handling of
|
# sent RGB color data
|
||||||
# such data, this is not typical in arduino type devices
|
x.writeReg(0x08, 0xAA)
|
||||||
s = "\x08\xAA\x04\xFF\x02\xFF"
|
x.writeReg(0x04, 255)
|
||||||
x.write(s)
|
x.writeReg(0x02, 255)
|
||||||
|
|||||||
Reference in New Issue
Block a user