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

No comments: