Skip to content

Commit 5b7425d

Browse files
committed
Fix set_brightness() comments
0 is not off, it's 1/16 brightness
1 parent a8c014f commit 5b7425d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/qwiic_alphanumeric_ex04_set_brightness.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ def run_example():
5959
while True:
6060
for i in range(0, 16):
6161
# The input to set_brightness() is a duty cycle over 16
62-
# So, the acceptable inputs to this function are ints between 0 (display off)
63-
# and 15 (full brightness)
62+
# So, the acceptable inputs to this function are ints between 0
63+
# (1/16 brightness) and 15 (full brightness)
6464
my_display.set_brightness(i)
6565
time.sleep(1)
6666
my_display.print("Milk")

qwiic_alphanumeric.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ def set_brightness(self, duty):
476476
This function sets the brightness of all displays on the bus.
477477
Duty cycle over 16.
478478
479-
:param duty: Valid between 0 (display off) and 15 (full brightness)
479+
:param duty: Valid between 0 (1/16 brightnss) and 15 (full brightness)
480480
:return: True if brightness is successfully updated, false otherwise.
481481
:rtype: bool
482482
"""

0 commit comments

Comments
 (0)