Skip to content

Commit

Permalink
Merge pull request #31 from esmil/master
Browse files Browse the repository at this point in the history
Don't show uninitialized data
  • Loading branch information
brentru committed Aug 21, 2020
2 parents 21699cc + 01cd6fd commit 17fd7df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion adafruit_is31fl3731.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ def __init__(self, i2c, address=0x74):
self.i2c = i2c
self.address = address
self._frame = None
self.reset()
self._init()

def _i2c_read_reg(self, reg, result):
Expand Down Expand Up @@ -141,13 +140,16 @@ def _mode(self, mode=None):
return self._register(_CONFIG_BANK, _MODE_REGISTER, mode)

def _init(self):
self.sleep(True)
time.sleep(0.01) # 10 MS pause to reset.
self._mode(_PICTURE_MODE)
self.frame(0)
for frame in range(8):
self.fill(0, False, frame=frame)
for col in range(18):
self._register(frame, _ENABLE_OFFSET + col, 0xFF)
self.audio_sync(False)
self.sleep(False)

def reset(self):
"""Kill the display for 10MS"""
Expand Down

0 comments on commit 17fd7df

Please sign in to comment.