-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f9e45eb
commit 90d9f53
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |