def flashingambergreen():
print("Flashing amber and green")
red.off()
green.off()
iCount = 1
while iCount <= 6:
yellow.on()
time.sleep(0.5)
yellow.off()
time.sleep(0.5)
iCount += 1
green.on()
# Flash the amber for one more second
# (Turn the green 'pedestrian' LED off and the red on)
评论列表
文章目录