import time
from machine import Pin

print("Hello, Mr Inglese")

REDled = Pin(1,Pin.OUT)
PurpleBerryled = Pin(6,Pin.OUT)
Bluled = Pin(8,Pin.OUT)

REDled.value(1)
time.sleep(0.3) 
REDled.value(0)

PurpleBerryled.value(1)
time.sleep(0.3) 
PurpleBerryled.value(0)

Bluled.value(1)
time.sleep(0.3) 
Bluled.value(0)


MyDelay = 0.3
Backwards = False

while True:
    PurpleBerryled.value(1)
    time.sleep(MyDelay) 
    PurpleBerryled.value(0)
    time.sleep(MyDelay)

    if MyDelay > 1.1:
        Backwards = True

    if MyDelay < 0.1:
        Backwards = False
    
    if Backwards == True:
        MyDelay -= 0.05
    else:
        MyDelay += 0.05

    print("My Delay is",MyDelay)


BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT