From 90d9f535ce5e0093cccb8269ce8ebf5a3a3be85e Mon Sep 17 00:00:00 2001 From: bathingsoap Date: Sat, 13 Jan 2018 03:16:28 -0800 Subject: [PATCH] lighttest --- light.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 light.py diff --git a/light.py b/light.py new file mode 100644 index 0000000..3761e9d --- /dev/null +++ b/light.py @@ -0,0 +1,15 @@ +import mraa + +# This example will change the LCD backlight on the Grove-LCD RGB backlight +# to a nice shade of purple +x = mraa.I2c(0) +x.address(0x62) + +# initialise device +x.writeReg(0, 0) +x.writeReg(1, 0) + +# sent RGB color data +x.writeReg(0x08, 0xAA) +x.writeReg(0x04, 255) +x.writeReg(0x02, 255)