Adafruit_Learning_System_Gu.../Welcome_to_CircuitPython/code.py
Pikime b249397413
Reformatted to reduce eash line length.
Max supported line length in Mu (the recommended editor) is 88 charecters. Several lines in the comments section were longer than this. Changed so it may be copy-pasted as directed in tutorial.
2022-01-22 14:25:55 +11:00

28 lines
751 B
Python
Executable file

# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""
Blink example for boards with ONLY a NeoPixel LED (e.g. without a built-in red LED).
Includes QT Py and various Trinkeys.
Requires two libraries from the Adafruit CircuitPython Library Bundle.
Download the bundle from circuitpython.org/libraries and copy the
following files to your CIRCUITPY/lib folder:
* neopixel.mpy
* adafruit_pypixelbuf.mpy
Once the libraries are copied, save this file as code.py to your CIRCUITPY
drive to run it.
"""
import time
import board
import neopixel
pixels = neopixel.NeoPixel(board.NEOPIXEL, 1)
while True:
pixels.fill((255, 0, 0))
time.sleep(0.5)
pixels.fill((0, 0, 0))
time.sleep(0.5)