Code: Select all
RED = (1, 0, 1, 0, 1, 1, 1, 0, 1, 2, 0)
BLUE = (0, 0, 1, 1, 0, 0, 1, 1)
GREEN = ( 0, 1, 0, 1, 2, 0, 1, 0, 1)
Code: Select all
enter_list = RED [:] #here it should be changed for any color from the list
for estado in enter_lis[:]:
if if estado == 0:
led1.off()
led2.off()
elif estado == 1:
led1.on()
led2.off()
else:
led1.off()
led2.on()
time.sleep_us(1000)