Skip to content

Commit 2e6d267

Browse files
committed
Add documentation to ModulinoButtonsLED
1 parent 68d63c7 commit 2e6d267

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/modulino/buttons.py

+11
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,33 @@
33
from micropython import const
44

55
class ModulinoButtonsLED():
6+
"""
7+
Class to interact with the LEDs of the Modulino Buttons.
8+
"""
9+
610
def __init__(self, buttons):
711
self._value = 0
812
self._buttons = buttons
913

1014
def on(self):
15+
""" Turns the LED on. """
1116
self.value = 1
1217

1318
def off(self):
19+
""" Turns the LED off. """
1420
self.value = 0
1521

1622
@property
1723
def value(self):
24+
""" Returns the value of the LED (1 for on, 0 for off). """
1825
return self._value
1926

2027
@value.setter
2128
def value(self, value):
29+
"""
30+
Sets the value of the LED (1 for on, 0 for off).
31+
Calling this method will update the physical status of the LED immediately.
32+
"""
2233
self._value = value
2334
self._buttons._update_leds()
2435

0 commit comments

Comments
 (0)