This blog is a record of what I do, what I think and what I read. If you are interested to know about my professional experience, you can refer to the other blog of mine. http://admi2camac.blogspot.com/
Wednesday, 1 February 2023
TTB02A Make an LED send SOS
from machine import Pin
from time import sleep
blueLed=Pin(15,Pin.OUT)
dot=.3
dash=2*dot
while True:
for i in range(1,4):
blueLed.value(0)
sleep(dot)
blueLed.value(1)
sleep(dot)
for i in range(1,4):
blueLed.value(0)
sleep(dash)
blueLed.value(1)
sleep(dash)
for i in range(1,4):
blueLed.value(0)
sleep(dot)
blueLed.value(1)
sleep(dot)
for i in range(1,4):
blueLed.value(0)
sleep(1)
#S.O.S represented in Morse code is
#▄ ▄ ▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄ ▄ ▄
#https://www.youtube.com/watch?v=pWzyb8VvxTY
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment