File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2
+ # SPDX-License-Identifier: MIT
3
+
4
+ # Simple seesaw test writing NeoPixels
5
+ # Can use any valid GPIO pin, up to 60 pixels!
6
+ #
7
+ # See the seesaw Learn Guide for wiring details:
8
+ # https://learn.adafruit.com/adafruit-seesaw-atsamd09-breakout?view=all#circuitpython-wiring-and-test
9
+
10
+ import time
11
+ import board
12
+ from rainbowio import colorwheel
13
+ from adafruit_seesaw import seesaw , neopixel
14
+
15
+ i2c_bus = board .I2C ()
16
+ ss = seesaw .Seesaw (i2c_bus )
17
+
18
+ NEOPIXEL_PIN = 6 # change to any pin
19
+ NEOPIXEL_NUM = 30 # no more than 60!
20
+ pixels = neopixel .NeoPixel (ss , NEOPIXEL_PIN , NEOPIXEL_NUM )
21
+ pixels .brightness = 0.3 # not so brite!
22
+
23
+ color_offset = 0 # start at red
24
+
25
+ # cycle through all colors along the strip
26
+ while True :
27
+ for i in range (NEOPIXEL_NUM ):
28
+ rc_index = (i * 256 // NEOPIXEL_NUM ) + color_offset
29
+ pixels [i ] = colorwheel (rc_index & 255 )
30
+ pixels .show ()
31
+ color_offset += 1
32
+ time .sleep (0.01 )
You can’t perform that action at this time.
0 commit comments