first edit by Tucker

This commit is contained in:
Paul Trowbridge 2022-02-19 22:54:52 -05:00
parent 64a8a1bfff
commit 2390ded42d
1 changed files with 15 additions and 7 deletions

View File

@ -3,14 +3,22 @@ from Led import *
led=Led()
def test_Led():
try:
led.ledIndex(0x01,255,0,0) #Red
led.ledIndex(0x02,255,125,0) #orange
led.ledIndex(0x04,255,255,0) #yellow
led.ledIndex(0x08,0,255,0) #green
led.ledIndex(0x10,0,255,255) #cyan-blue
led.ledIndex(0x20,0,0,255) #blue
#led.ledIndex(0x01,255,0,0) #Red
#led.ledIndex(0x02,255,125,0) #orange
#led.ledIndex(0x04,255,255,0) #yellow
#led.ledIndex(0x08,0,255,0) #green
#led.ledIndex(0x10,0,255,255) #cyan-blue
#led.ledIndex(0x20,0,0,255) #blue
#led.ledIndex(0x40,128,0,128) #purple
#led.ledIndex(0x80,255,255,255) #white'''
led.ledIndex(0x01,128,0,128) #Red
led.ledIndex(0x02,128,0,128) #orange
led.ledIndex(0x04,128,0,128) #yellow
led.ledIndex(0x08,128,0,128) #green
led.ledIndex(0x10,128,0,128) #cyan-blue
led.ledIndex(0x20,128,0,128) #blue
led.ledIndex(0x40,128,0,128) #purple
led.ledIndex(0x80,255,255,255) #white'''
led.ledIndex(0x80,128,0,128) #white'''
print ("The LED has been lit, the color is red orange yellow green cyan-blue blue white")
time.sleep(3) #wait 3s
led.colorWipe(led.strip, Color(0,0,0)) #turn off the light