A Morse code decoder written in Rust. Supports two input modes: a physical button via GPIO (embedded board) or the spacebar on a standard Linux keyboard.
sudo apt-get install build-essential
sudo apt-get install libc6-dev-riscv64-cross
sudo apt-get install gcc-riscv64-linux-gnuNote
For keyboard mode, make sure your user is in the input group so you can read /dev/input/event* without root:
sudo usermod -aG input $USER
# Log out and back in for the change to take effectcargo build --release --features keyboardcargo build --release --features gpiocargo build --release --features gpio,keyboard./target/release/morse --input keyboard./target/release/morse --input gpioHold the button/key for a short time to send a dot ·, hold longer for a dash —. The decoder calculates the dot/dash threshold automatically from your own rhythm, so no manual calibration is needed.
| Signal | Duration |
|---|---|
| Dot | 1 unit |
| Dash | 3 units |
| Gap between symbols | 1 unit |
| Gap between letters | 3 units |
| Gap between words | 7 units |
After 2 seconds of silence the current sequence is decoded and printed.
Set the RUST_LOG environment variable to control verbosity:
RUST_LOG=debug ./target/release/morse --input keyboard # show every pulse
RUST_LOG=info ./target/release/morse --input keyboard # decoded text only