Skip to content

Commit

Permalink
Disabled unused LED channels
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Feb 19, 2018
1 parent 12dd23b commit 71fba2b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion library/scrollphathd/is31fl3731.py
Expand Up @@ -116,8 +116,20 @@ def setup(self):
# Disable audio sync
self.i2c.write_i2c_block_data(self.address, _AUDIOSYNC_REGISTER, [0])

enable_pattern = [
0b11111111, 0b01111111,
0b11111111, 0b01111111,
0b11111111, 0b01111111,
0b11111111, 0b01111111,
0b11111111, 0b01111111,
0b11111111, 0b01111111,
0b11111111, 0b01111111,
0b11111111, 0b11111111,
]

# Enable LEDs
self._bank(1)
self.i2c.write_i2c_block_data(self.address, 0, [255] * 17)
self.i2c.write_i2c_block_data(self.address, 0x00, enable_pattern)

# Switch to bank 0 ( frame 0 )
self._bank(0)
Expand Down

0 comments on commit 71fba2b

Please sign in to comment.