diff --git a/en/tutorials/sewable_leds.md b/en/tutorials/sewable_leds.md index 523343cc43bc4946d286f58276eb80f12d24e0b6..599a7c0c542b440cb482beada257310d13f60b6b 100644 --- a/en/tutorials/sewable_leds.md +++ b/en/tutorials/sewable_leds.md @@ -74,13 +74,18 @@ You can adjust the color, number of leds and which pin is used. import buttons import ws2812 import utime +import color +import gpio COLOR_ON = color.YELLOW * 0.2 # 20% yellow COLOR_OFF = [0, 0, 0] -LED_NUM = 2 # number of attached LEDs +LED_NUM = 1 # Number of connected LEDS: 1 LED_PIN = gpio.WRISTBAND_1 +ws2812.set_all(LED_PIN, [COLOR_OFF] * LED_NUM) +ws2812.set_all(LED_PIN, [COLOR_OFF] * LED_NUM) + state = False while True: if buttons.read(buttons.BOTTOM_RIGHT): @@ -96,6 +101,7 @@ while True: utime.sleep(0.1) while buttons.read(buttons.BOTTOM_RIGHT): pass utime.sleep(0.1) + ``` An example which connects the accelerometer with multiple RGB LEDs. They start lighting up when the card10 is moved: