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.
24 lines
504 B
24 lines
504 B
import sys
|
|
import leglight
|
|
# allLights = leglight.discover(2)
|
|
# print(allLights)
|
|
# for light in allLights:
|
|
# light.off()
|
|
left = leglight.LegLight('192.168.68.100',9123)
|
|
right = leglight.LegLight('192.168.68.101',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()
|