You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
446 B
18 lines
446 B
7 years ago
|
#!/bin/env python3
|
||
|
import gex
|
||
|
import time
|
||
|
|
||
7 years ago
|
# play a little neopixel animation as a demo
|
||
|
|
||
7 years ago
|
with gex.Client(gex.TrxRawUSB()) as client:
|
||
|
# Neopixel strip
|
||
7 years ago
|
strip = gex.Neopixel(client, 'npx')
|
||
7 years ago
|
# Load RGB to the strip
|
||
|
strip.load([0xFF0000, 0xFFFF00, 0x00FF00, 0x0000FF, 0xFF00FF])
|
||
|
|
||
|
for i in range(0,255):
|
||
|
strip.load([0xFF0000+i, 0xFFFF00, 0x00FF00, 0x0000FF, 0xFF00FF])
|
||
7 years ago
|
time.sleep(0.01)
|
||
7 years ago
|
|
||
|
strip.clear()
|