Example of the serial port communication.
This project allows you to input a word or sentence using Raspberry usb serial port via the Minicom terminal, convert it to Morse code, and blink an LED on a Raspberry Pi Pico to represent the Morse code. The Morse code translation is also printed back to the terminal.
-
Clone the Repository:
$ git clone https://github.com/L-A-Marchetti/Morse.git $ cd Morse
-
Clone the
pico-sdk
$ cd .. $ git clone https://github.com/raspberrypi/pico-sdk.git --branch master $ cd pico-sdk $ git submodule update --init
-
Copy the external pico sdk import
Copy ‘pico_sdk_import.cmake’ file from the /pico-sdk/external directory into the github repository.
$ cd ../Morse $ cp ../pico-sdk/external/pico_sdk_import.cmake .
-
Create the build folder
$ mkdir build $ cd build $ export PICO_SDK_PATH=../../pico-sdk $ cmake ..
-
Compile (if needed):
make -j4
-
Upload the Code to the Pico:
Connect your Raspberry Pi Pico to your computer via USB, then drag and drop the generated
morse.uf2
file from thebuild
directory to the Pico.
-
Open Minicom:
sudo minicom -b 115200 -o -D /dev/ttyACM0
-
Interact with the Program:
- Enter a word or sentence.
- End the input with
!
. - The program will process the input and start blinking the LED according to the Morse code translation.
- The Morse code translation will also be displayed in the Minicom terminal.