2018-03-16 14:53:34 +01:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
from lw12 import *
|
|
|
|
import time
|
|
|
|
|
|
|
|
|
|
|
|
lw12 = LW12Controller('192.168.178.24', 5000)
|
|
|
|
print('[+] LW12 LIGHT OFF')
|
|
|
|
lw12.light_off()
|
|
|
|
time.sleep(.500)
|
|
|
|
print('[+] LW12 LIGHT ON')
|
|
|
|
lw12.light_on()
|
|
|
|
time.sleep(.500)
|
2018-03-16 18:15:18 +01:00
|
|
|
# print('[+] LW12_COLOR_STATIC')
|
|
|
|
# for color in LW12_COLOR_STATIC:
|
|
|
|
# print(' {}'.format(color))
|
|
|
|
# lw12.set_effect_color(color)
|
|
|
|
# time.sleep(.250)
|
|
|
|
# print('[+] LW12_LIGHT.BRIGHTNESS')
|
|
|
|
# for brightness in range(0, 101, 5):
|
|
|
|
# print(' brightness={}'.format(brightness))
|
|
|
|
# lw12.set_light_option(LW12_LIGHT.BRIGHTNESS, brightness)
|
|
|
|
# time.sleep(.250)
|
|
|
|
# print('[+] LW12_LIGHT.FLASH')
|
|
|
|
# print(' speed=100')
|
|
|
|
# lw12.set_light_option(LW12_LIGHT.FLASH, 100)
|
|
|
|
# print('[+] LW12_COLOR_JUMP')
|
|
|
|
# for color in LW12_COLOR_JUMP:
|
|
|
|
# print(' {}'.format(color))
|
|
|
|
# lw12.set_effect_color(color)
|
|
|
|
# time.sleep(2)
|
|
|
|
# print('[+] LW12_COLOR_FLASH')
|
|
|
|
# for color in LW12_COLOR_FLASH:
|
|
|
|
# print(' {}'.format(color))
|
|
|
|
# lw12.set_effect_color(color)
|
|
|
|
# time.sleep(2)
|
|
|
|
# print('[+] LW12_COLOR_GRADIENT')
|
|
|
|
# for color in LW12_COLOR_GRADIENT:
|
|
|
|
# print(' {}'.format(color))
|
|
|
|
# lw12.set_effect_color(color)
|
|
|
|
# time.sleep(2)
|
|
|
|
# lw12.set_effect_color(LW12_COLOR_STATIC.PURPLE)
|
|
|
|
# lw12.set_light_option(LW12_LIGHT.BRIGHTNESS, 10)
|
|
|
|
print('[+] LW12 SCAN')
|
|
|
|
lw12.scan()
|