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
510 B
24 lines
510 B
import sys
|
|
import leglight
|
|
# allLights = leglight.discover(2)
|
|
# print(allLights)
|
|
# for light in allLights:
|
|
# light.off()
|
|
left = leglight.LegLight('192.168.68.109',9123)
|
|
right = leglight.LegLight('192.168.68.110',9123)
|
|
|
|
if sys.argv[1] == 'brighten':
|
|
print('bright')
|
|
left.brightness(100)
|
|
right.brightness(100)
|
|
left.color(3500)
|
|
right.color(2900)
|
|
else:
|
|
print('dim')
|
|
left.brightness(5)
|
|
right.brightness(5)
|
|
left.color(2900)
|
|
right.color(2900)
|
|
#print(myLight)
|
|
#myLight.on()
|