pimoroni-pico/micropython/examples/servo2040/turn_off_leds.py

19 wiersze
481 B
Python
Czysty Zwykły widok Historia

2022-03-22 15:14:10 +00:00
from plasma import WS2812
from servo import servo2040
"""
A simple program that turns off the onboard LED bar.
Press "Boot" to exit the program.
NOTE: Plasma WS2812 uses the RP2040's PIO system, and as
such may have problems when running code multiple times.
If you encounter issues, try resetting your board.
"""
# Create the LED bar, using PIO 1 and State Machine 0
2022-03-25 12:37:50 +00:00
led_bar = WS2812(servo2040.NUM_LEDS, 1, 0, servo2040.LED_DATA)
2022-03-22 15:14:10 +00:00
# Start updating the LED bar
led_bar.start()