A tiny USB HID adapter for a CW (Morse) paddle. It reads the two paddle
contacts and reports them as Left Ctrl / Right Ctrl key presses over
USB, so any keyboard-based CW keyer software can use a real paddle as
input.
Each paddle contact shorts its pin to ground when squeezed. The microcontroller uses internal pull-ups, debounces the input, and sends a USB HID key press/release for as long as the contact stays closed:
- Left paddle (dit) →
Left Ctrl - Right paddle (dah) →
Right Ctrl
See src/main.cpp for the implementation.
Board-specific and behavioral settings live in include/, not in
src/main.cpp, so they can be tweaked without touching the logic:
include/pins.h— which pins the paddle is wired to:PIN_LEFT(default2) — dit contactPIN_RIGHT(default4) — dah contact
include/config.h— keyer behavior:PADDLE_LEFT_KEY(defaultKEY_LEFT_CTRL) — key sent for the left paddlePADDLE_RIGHT_KEY(defaultKEY_RIGHT_CTRL) — key sent for the right paddleDEBOUNCE_MS(default5) — software debounce time in milliseconds- Any key supported by
Keyboard.hcan be used forPADDLE_LEFT_KEY/PADDLE_RIGHT_KEY.
- Seeeduino XIAO (default target,
env:xiao) or Arduino Leonardo (env:leonardo) — both have native USB and can act as a USB HID keyboard. - A CW paddle (iambic or single-lever) with a common ground return.
┌──────────────────────┐
│ Seeeduino XIAO / │
│ Arduino Leonardo │
│ │
Dit ──────────┤ D2 │
│ │
Dah ──────────┤ D4 │
│ │
Common ─────────┤ GND │
│ │
│ USB ├──── to computer
└──────────────────────┘
D2= dit (left paddle) contact (PIN_LEFTininclude/pins.h)D4= dah (right paddle) contact (PIN_RIGHTininclude/pins.h)- Paddle common ⟶ board
GND - No external resistors needed — the firmware enables internal pull-ups
on
PIN_LEFTandPIN_RIGHT. - If you rewire to different pins, update
include/pins.hto match.
This is a PlatformIO project.
# build + upload to the default env (xiao)
pio run -t upload
# or target the Leonardo
pio run -e leonardo -t uploadMIT — see LICENSE.
