Skip to content

Instantly share code, notes, and snippets.

@wa5znu
Created February 20, 2022 23:30
Show Gist options
  • Save wa5znu/184d2d88803d54b690afe9fc182431b4 to your computer and use it in GitHub Desktop.
Save wa5znu/184d2d88803d54b690afe9fc182431b4 to your computer and use it in GitHub Desktop.
test Adafruit CircuitPython 6.0.0 on 2020-11-16; Seeeduino XIAO with samd21g18
import time
import board
from digitalio import DigitalInOut, Direction
led = DigitalInOut(board.D13)
led.direction = Direction.OUTPUT
SPEED=0.05
def dah():
led.value = False
time.sleep(SPEED*9.0)
led.value = True
time.sleep(SPEED*1.5)
def dit():
led.value = False
time.sleep(SPEED*2)
led.value = True
time.sleep(SPEED*2)
def eoc():
led.value = True
time.sleep(SPEED*6.0)
def eow():
led.value = True
time.sleep(SPEED*9.0)
while True:
print("C")
dah(); dit(); dah(); dit(); eoc(); eoc()
print("Q")
dah(); dah(); dit(); dah(); eow()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment