mirror of
				https://github.com/hyperion-project/hyperion.ng.git
				synced 2025-03-01 10:33:28 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			460 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			460 B
		
	
	
	
		
			Python
		
	
	
	
	
	
import hyperion, time
 | 
						|
 | 
						|
# Get the rotation time
 | 
						|
color     =       hyperion.args.get('color',     (255,255,255))
 | 
						|
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():
 | 
						|
	hyperion.setColor(0, 0, 0)
 | 
						|
	time.sleep(sleepTime)
 | 
						|
	hyperion.setColor(color[0], color[1], color[2])
 | 
						|
	time.sleep(sleepTime)
 |