Skip to content

Commit

Permalink
lighttest
Browse files Browse the repository at this point in the history
  • Loading branch information
bathingsoap authored Jan 13, 2018
1 parent f9e45eb commit 90d9f53
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions light.py
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 90d9f53

Please sign in to comment.