mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
Add more ledboard examples
This commit is contained in:
11
docs/examples/led_board_4.py
Normal file
11
docs/examples/led_board_4.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from gpiozero import LEDBoard
|
||||
from time import sleep
|
||||
|
||||
leds = LEDBoard(2, 3, 4, 5, 6, 7, 8, 9)
|
||||
|
||||
leds[0].on() # first led on
|
||||
sleep(1)
|
||||
leds[7].on() # last led on
|
||||
sleep(1)
|
||||
leds[-1].off() # last led off
|
||||
sleep(1)
|
||||
Reference in New Issue
Block a user