# Program for CircuitPython on a Pico W

import board
import digitalio
import time

led = digitalio.DigitalInOut(board.LED)
led15 = digitalio.DigitalInOut(board.GP15)
led16 = digitalio.DigitalInOut(board.GP16)

led.direction = digitalio.Direction.OUTPUT
led15.direction = digitalio.Direction.OUTPUT
led16.direction = digitalio.Direction.OUTPUT

print("\nCircuitPython example code")
print("Cycle the onboard LED and LED's connected to GP15 & GP16\n")


def cycleLED(ledID):
    ledID.value = True
    time.sleep(1)
    ledID.value = False 
    time.sleep(1)
    
def turnOffLED(ledID):
    ledID.value = False
    
print("Turn off all LED's")
turnOffLED(led)
turnOffLED(led15)
turnOffLED(led16)
    
print("Cycle LEDs")  

while True:
  
  print("Cycle start")
  cycleLED(led)
  cycleLED(led15)
  cycleLED(led16)
  cycleLED(led15)
  
  time.sleep(.25)   #wait for one second

