From 8615a312c3d13c724e68a3d8d94857625248fcd2 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Mon, 20 Oct 2025 09:37:52 -0500 Subject: [PATCH] add neopixels only example --- examples/fruitjam_neopixels.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 examples/fruitjam_neopixels.py diff --git a/examples/fruitjam_neopixels.py b/examples/fruitjam_neopixels.py new file mode 100644 index 0000000..1e250bb --- /dev/null +++ b/examples/fruitjam_neopixels.py @@ -0,0 +1,24 @@ +# SPDX-FileCopyrightText: Copyright (c) 2025 Tim Cocks for Adafruit Industries +# +# SPDX-License-Identifier: MIT +import time + +from adafruit_fruitjam.peripherals import Peripherals + +colors = [0xFF00FF, 0xFFFF00, 0x00FF00] + +fruitjam = Peripherals() +fruitjam.neopixels.brightness = 0.1 + +while True: + fruitjam.neopixels.fill(colors[0]) + time.sleep(0.3) + fruitjam.neopixels.fill(colors[1]) + time.sleep(0.3) + fruitjam.neopixels.fill(colors[2]) + time.sleep(0.3) + fruitjam.neopixels.fill(0x000000) + + for i in range(5): + fruitjam.neopixels[i] = colors[i % len(colors)] + time.sleep(0.1)