from machine import Pin
from utime import sleep
sleep(0.01) # Wait for USB to connect
DOT = "."
DASH = "-"
LETTER_BREAK = " "
WORD_BREAK = "/"
code = "..-. .--."
DIR_PIN = Pin(3, Pin.OUT)
STEP_PIN = Pin(2, Pin.OUT)
print("Hello, Pi Pico!")
def run_morse_code(morse_code, out_pin, unit_time):
for elem in morse_code:
pass
i = 0
DIR_PIN.on()
while True:
i += 1
if i % 100 == 0:
DIR_PIN.toggle()
STEP_PIN.on()
STEP_PIN.off()
sleep(0.01)