Skip to content

Commit ec12d3f

Browse files
committed
Fix minimum brightness comments
setBrightness(0) is actually 1/16 brightness, not 0
1 parent a399e8a commit ec12d3f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/Example_04_SetBrightness/Example_04_SetBrightness.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void setup() {
3535
Serial.println("Display acknowledged.");
3636

3737
//The input to setBrightness is a duty cycle over 16
38-
//So, acceptable inputs to this function are ints between 0 (display off) and 15 (full brightness)
38+
//So, acceptable inputs to this function are ints between 0 (1/16 brightness) and 15 (full brightness)
3939
display.setBrightness(15);
4040

4141
display.print("Milk");

src/SparkFun_Alphanumeric_Display.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ bool HT16K33::clear()
322322
}
323323

324324
// This function sets the brightness of all displays on the bus.
325-
// Duty cycle valid between 0 (off) and 15 (full brightness)
325+
// Duty cycle valid between 0 (1/16 brightness) and 15 (full brightness)
326326
bool HT16K33::setBrightness(uint8_t duty)
327327
{
328328
bool status = true;
@@ -335,7 +335,7 @@ bool HT16K33::setBrightness(uint8_t duty)
335335
}
336336

337337
// Set the brightness of a single display
338-
// Duty cycle valid between 0 (off) and 15 (full brightness)
338+
// Duty cycle valid between 0 (1/16 brightness) and 15 (full brightness)
339339
bool HT16K33::setBrightnessSingle(uint8_t displayNumber, uint8_t duty)
340340
{
341341
if (duty > 15) // Error check

0 commit comments

Comments
 (0)