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.
27 lines
517 B
27 lines
517 B
import sys
|
|
import leglight
|
|
|
|
allLights = leglight.discover(2)
|
|
|
|
for light in allLights:
|
|
print(light.address)
|
|
# light.off()
|
|
|
|
left = leglight.LegLight(allLights[0].address,9123)
|
|
right = leglight.LegLight(allLights[1].address,9123)
|
|
|
|
if sys.argv[1] == 'day':
|
|
print('day')
|
|
left.brightness(100)
|
|
right.brightness(100)
|
|
left.color(3500)
|
|
right.color(2900)
|
|
else:
|
|
print('night')
|
|
left.brightness(5)
|
|
right.brightness(5)
|
|
left.color(2900)
|
|
right.color(2900)
|
|
#print(myLight)
|
|
#myLight.on()
|