/ Welcome_to_CircuitPython / code.py
code.py
1 # SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries 2 # 3 # SPDX-License-Identifier: MIT 4 5 """ 6 Blink example for boards with ONLY a NeoPixel LED (e.g. without a built-in red LED). 7 Includes QT Py and various Trinkeys. 8 9 Requires two libraries from the Adafruit CircuitPython Library Bundle. 10 Download the bundle from circuitpython.org/libraries and copy the 11 following files to your CIRCUITPY/lib folder: 12 * neopixel.mpy 13 * adafruit_pixelbuf.mpy 14 15 Once the libraries are copied, save this file as code.py to your CIRCUITPY 16 drive to run it. 17 """ 18 import time 19 import board 20 import neopixel 21 22 pixels = neopixel.NeoPixel(board.NEOPIXEL, 1) 23 24 while True: 25 pixels.fill((255, 0, 0)) 26 time.sleep(0.5) 27 pixels.fill((0, 0, 0)) 28 time.sleep(0.5)