from machine import Pin
from time import sleep
myLED=Pin('LED', Pin.OUT)
myLED.off()
print('LED now flashes with toggle')
for x in range(1, 30, 1):
myLED.toggle()
sleep(1)
print('LED now flashes asymmetrically')
while True:
myLED.value(1)
sleep(1)
myLED.value(0)
sleep(.1)
#https://www.youtube.com/watch?v=SL4_oU9t8Ss&t=0s
No comments:
Post a Comment