From 65c3f7949b20fc650d623fd8423622ad4eebb390 Mon Sep 17 00:00:00 2001 From: ploedige Date: Thu, 12 Jan 2023 14:27:28 +0000 Subject: [PATCH] led test is running --- led_test.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 led_test.py diff --git a/led_test.py b/led_test.py new file mode 100644 index 0000000..4b8ceb8 --- /dev/null +++ b/led_test.py @@ -0,0 +1,25 @@ +# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries +# SPDX-License-Identifier: MIT + +# Simple test for NeoPixels on Raspberry Pi +import time +import board +import neopixel + + +# Choose an open pin connected to the Data In of the NeoPixel strip, i.e. board.D18 +# NeoPixels must be connected to D10, D12, D18 or D21 to work. +pixel_pin = board.D18 + +# The number of NeoPixels +num_pixels = 5 + +# The order of the pixel colors - RGB or GRB. Some NeoPixels have red and green reversed! +# For RGBW NeoPixels, simply change the ORDER to RGBW or GRBW. +ORDER = neopixel.GRB + +pixels = neopixel.NeoPixel( + pixel_pin, num_pixels, brightness=0.2, auto_write=False, pixel_order=ORDER +) + +pixels.fill((0,255,0)) \ No newline at end of file