Skip to content

Commit 27d8569

Browse files
committed
Add a clear digit method
1 parent 99a2955 commit 27d8569

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Adafruit_LEDBackpack/Adafruit_7Segment.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ def writeDigit(self, charNumber, value, dot=False):
4040
# Set the appropriate digit
4141
self.disp.setBufferRow(charNumber, self.digits[value] | (dot << 7))
4242

43+
def clearDigit(self, charNumber):
44+
if (charNumber > 7):
45+
return;
46+
self.disp.setBufferRow(charNumber, 0)
47+
4348
def setColon(self, state=True):
4449
"Enables or disables the colon character"
4550
# Warning: This function assumes that the colon is character '2',

0 commit comments

Comments
 (0)