Skip to content

Commit 98f47e1

Browse files
author
=Dale Weber
committed
Added documentation for the new constructor brightness parameter.
1 parent 77e2c5d commit 98f47e1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

adafruit_ht16k33/ht16k33.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ class HT16K33:
4747
:param int address: The I2C addess of the HT16K33.
4848
:param bool auto_write: True if the display should immediately change when
4949
set. If False, `show` must be called explicitly.
50+
:param float brightness: 0.0 - 1.0 default brightness level.
5051
"""
51-
def __init__(self, i2c, address=0x70, auto_write=True):
52+
def __init__(self, i2c, address=0x70, auto_write=True, brightness=1.0):
5253
self.i2c_device = i2c_device.I2CDevice(i2c, address)
5354
self._temp = bytearray(1)
5455
self._buffer = bytearray(17)
@@ -58,7 +59,7 @@ def __init__(self, i2c, address=0x70, auto_write=True):
5859
self._blink_rate = None
5960
self._brightness = None
6061
self.blink_rate = 0
61-
self.brightness = 1.0
62+
self.brightness = brightness
6263

6364
def _write_cmd(self, byte):
6465
self._temp[0] = byte

0 commit comments

Comments
 (0)