Updating neodriver extended bus example
Updating the neodriver extended bus example for non-Pi single board computers after some additional testing
This commit is contained in:
parent
e659987db5
commit
7f9bbaca67
1 changed files with 4 additions and 4 deletions
|
|
@ -9,12 +9,12 @@ from rainbowio import colorwheel
|
||||||
from adafruit_extended_bus import ExtendedI2C as I2C
|
from adafruit_extended_bus import ExtendedI2C as I2C
|
||||||
from adafruit_seesaw import seesaw, neopixel
|
from adafruit_seesaw import seesaw, neopixel
|
||||||
|
|
||||||
i2c = I2C(1)
|
i2c = I2C(1, frequency=800000)
|
||||||
ss = seesaw.Seesaw(i2c, addr=0x60)
|
ss = seesaw.Seesaw(i2c, addr=0x60)
|
||||||
neo_pin = 15
|
neo_pin = 15
|
||||||
num_pixels = 64
|
num_pixels = 30
|
||||||
|
|
||||||
pixels = neopixel.NeoPixel(ss, neo_pin, num_pixels, brightness = 0.1)
|
pixels = neopixel.NeoPixel(ss, neo_pin, num_pixels, brightness = 0.3, auto_write=False)
|
||||||
|
|
||||||
color_offset = 0
|
color_offset = 0
|
||||||
|
|
||||||
|
|
@ -23,5 +23,5 @@ while True:
|
||||||
rc_index = (i * 256 // num_pixels) + color_offset
|
rc_index = (i * 256 // num_pixels) + color_offset
|
||||||
pixels[i] = colorwheel(rc_index & 255)
|
pixels[i] = colorwheel(rc_index & 255)
|
||||||
pixels.show()
|
pixels.show()
|
||||||
color_offset += 1
|
color_offset += 8
|
||||||
time.sleep(0.01)
|
time.sleep(0.01)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue