Simple test¶
Ensure your device works with this simple test.
examples/morsecode_simpletest.py¶
1# SPDX-FileCopyrightText: Copyright (c) 2021 Jose David M.
2#
3# SPDX-License-Identifier: Unlicense
4
5"""
6Simple test to use the internal led to turn it on and off using morse code
7"""
8import time
9import board
10from morsecode import Emitter
11
12# Using Internal led
13internal_led = Emitter(board.D13)
14
15MESSAGE = "Hugo AKA the Architect"
16
17while True:
18 print(f"Sending {MESSAGE} to the internal led in 3 seconds")
19 time.sleep(3)
20 print("starting")
21 internal_led.outmorse(MESSAGE)
22 print("Message Ended")