File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ # EdgePi LED Module
2+
3+ # Hardware
4+
5+ The EdgePi has an array of eight programmable LED lights. The LED module allows users to interact with each LED individually.
6+
7+ # Example Code
8+ This code example demonstrates how to use the LED module to turn an LED on and off:
9+ ```
10+ from edgepi.led.edgepi_leds import EdgePiLED
11+ from edgepi.gpio.gpio_configs import LEDPins
12+
13+ leds = EdgePiLED()
14+
15+ leds.turn_on(LEDPins.LED_OVR1)
16+
17+ leds.turn_off(LEDPins.LED_OVR1)
18+ ```
19+
20+ # Functionalities
21+
22+ Currently, the LED module offers the following functionalities:
23+ 1 . Turn an LED on or off.
24+ 2 . Toggle an LED to the opposite state.
25+ 3 . Read an LED's on/off state.
26+
27+ # User Guide
28+
29+ ## Turn an LED on/off
30+ ```
31+ leds.turn_on(LEDPins.LED_OVR1)
32+
33+ leds.turn_off(LEDPins.LED_OVR1)
34+ ```
35+
36+ ## Toggle an LED to the opposite state
37+ ```
38+ leds.toggle_led(LEDPins.LED_OVR1)
39+ ```
40+
41+ ## Read an LED's on/off state
42+ ```
43+ state = leds.get_led_state(LEDPins.LED_OVR1)
44+ ```
45+
46+ # Limitations
You can’t perform that action at this time.
0 commit comments