/ PyLeap_NeoPixel_Blinky_demo / code.py
code.py
1 # SPDX-FileCopyrightText: 2021 TrevKnows for Adafruit Industries 2 # 3 # SPDX-License-Identifier: MIT 4 5 import time 6 import board 7 import neopixel 8 9 10 pixels = neopixel.NeoPixel(board.NEOPIXEL, 10, brightness=0.2, auto_write=False) 11 PURPLE = (10, 0, 25) 12 PINK = (25, 0, 10) 13 OFF = (0,0,0) 14 15 while True: 16 pixels.fill(PURPLE) 17 pixels.show() 18 time.sleep(0.5) 19 pixels.fill(OFF) 20 pixels.show() 21 time.sleep(0.5) 22 pixels.fill(PINK) 23 pixels.show() 24 time.sleep(0.5) 25 pixels.fill(OFF) 26 pixels.show() 27 time.sleep(0.5)