2016-01-28 06:12:28 +01:00
|
|
|
import hyperion, time
|
2013-12-13 23:00:57 +01:00
|
|
|
|
|
|
|
# Get the rotation time
|
2013-12-14 03:03:21 +01:00
|
|
|
color = hyperion.args.get('color', (255,255,255))
|
2013-12-13 23:00:57 +01:00
|
|
|
frequency = float(hyperion.args.get('frequency', 10.0))
|
|
|
|
|
|
|
|
# Check parameters
|
|
|
|
frequency = min(100.0, frequency)
|
|
|
|
|
|
|
|
# Compute the strobe interval
|
|
|
|
sleepTime = 1.0 / frequency
|
|
|
|
|
|
|
|
# Start the write data loop
|
|
|
|
while not hyperion.abort():
|
2016-01-28 06:12:28 +01:00
|
|
|
hyperion.setColor(0, 0, 0)
|
2013-12-13 23:00:57 +01:00
|
|
|
time.sleep(sleepTime)
|
2016-01-28 06:12:28 +01:00
|
|
|
hyperion.setColor(color[0], color[1], color[2])
|
2013-12-13 23:00:57 +01:00
|
|
|
time.sleep(sleepTime)
|