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)