'''
example name：Running LEDs
version：v2.0
date：2020.3
Author：01Studio
'''

from gpiozero import LED #import LED module
from time import sleep   #import delay module

#Initialize LEDS
LED_R= LED(4)
LED_Y= LED(5)
LED_G= LED(6)

#Define an array to facilitate the use of loop statements
LED=[LED_R, LED_Y, LED_G]

while True:

    for i in range(0,3): #Loop 3 times

        LED[i].on() #turn on LED
        sleep(1)     #delay 1 second
        LED[i].off() #turn off LED
