File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99
1010
1111class Leds :
12+ """
13+ A utility class for controlling LED colors on Arduino hardware.
14+
15+ This class provides static methods to control two RGB LEDs by writing to system
16+ brightness files. LED1 and LED2 can be controlled directly by the MPU, while
17+ LED3 and LED4 require MCU control via Bridge.
18+
19+ Attributes:
20+ _led_ids (list): List of supported LED IDs [1, 2].
21+ _led1_brightness_files (list): System file paths for LED1 RGB channels
22+ (red:user, green:user, blue:user).
23+ _led2_brightness_files (list): System file paths for LED2 RGB channels
24+ (red:panic, green:wlan, blue:bt).
25+
26+ Methods:
27+ set_led1_color(r, g, b): Set the RGB color state for LED1.
28+ set_led2_color(r, g, b): Set the RGB color state for LED2.
29+
30+ Example:
31+ >>> Leds.set_led1_color(True, False, True) # LED1 shows magenta
32+ >>> Leds.set_led2_color(False, True, False) # LED2 shows green
33+ """
1234 _led_ids = [1 , 2 ] # Supported LED IDs (Led 3 and 4 can't be controlled directly by MPU but only by MCU via Bridge)
1335
1436 _led1_brightness_files = [
You can’t perform that action at this time.
0 commit comments