DIY Configurable USB Morse Code Interface for LCWO, PCWFistCheck, VBand, MorseMania etc. In collaboration with the Online Configurator , this interface allows you to use your favorite Morse key with various programs and apps, instead of relying on a mouse or keyboard.
Please note that not all browsers support WebUSB. Refer to the Browser Support section in this Readme doc for more information.
When the interface is connected to a USB port, the interface program waits for an initial key press (from the Morse key).
- If this key press lasts less than 2 seconds, the interface program will proceed with either the default values or the configuration values specified using the online configurator.
- If it lasts longer than 2 seconds, the program will wait for a connection with the Online Configurator. Amber light indicates that the device is in the configuration mode. When you intend to configure the device, connect the jack connectors before connecting USB. Some jack sockets generate short key press when the plug is inserted and this way you miss the opportunity to connect the device with the Online Configurator.
The Online Configurator will prompt you to select the correct USB device/port (in this case, the Seeeduino XIAO).
Once the connection is established, you can specify the type of Morse key and configure the interface for:
- Mouse emulation, or
- Keyboard emulation.
Depending on the chosen emulation mode, you can assign actions such as the right/left mouse button or the right/left Ctrl key.
To stop the configuration process (don´t forget to send the new configuration to the XIAO):
- Press the Morse key briefly, or
- Close the Online Configurator.
The configuration will be stored in the interface's permanent memory and the page will display status "Data received."
| Straight Key/LeftPaddle | Right Paddle | Emulation | |
|---|---|---|---|
| vband | [ | ] | Keyboard |
| Vail | x | z | Keyboard |
| morsecode.me | e | I | Keyboard |
| vband, vail | Ctrl-L | Ctrl-R | Keyboard |
| PCWFistCheck | Left-Mouse | Right-Mouse | Mouse |
This project only needs a micro jack, some wire, a USB-C/USB cable, and of course a Seeeduino XIAO SAMD21.
For this project, pins 6,7 and ground are used.
The STL files for the 3D-printed Seeeduino case can be found on morse-code-usbhid-interface-the-gadget.
Binary firmware files are available in Releases. There are two options for uploading code to XIAO SAMD21:
- Flashing firmware.bin with the BOSSA tool.
- Using UF2 Bootloader
Flashing tool is avalable at https://shumatech.com/web/products/bossa
Tested with command line bossac version 1.7.0 installed with PlatformIO
bossac -e -w -v -b -R firmware.binNewer GUI versions are not tested.
Reset to Bootloader (see below) is required when reflashing previously installed firmware and bossac fails, because upload port is unavailable.
Reset XIAO to bootloader mode: https://wiki.seeedstudio.com/noport_upload_fails/#enter-bootloader-mode An USB drive named Arduino appears, upload file CURRENT.UF2 there. XIAO will restart and run the uploaded firmware.
The file CURRENT.UF2 is configured in paddle mode, keyboard emulation, sending [ and ] as events. (Tested with vband and vail.)
For this project, I used Visual Studio Code as the IDE with the PlatformIO plugin. PlatformIO requires functions to be declared before they are called in the code. This is because PlatformIO uses a more standard C++ compilation process, which strictly adheres to the requirement that functions must be declared before use.
For using the Arduino IDE, the code is converted and placed in a separate folder in this repository. See the Arduino IDE paragraph for more details.
For writing clean code, the SonarLint plugin is installed in Visual Studio Code. SonarLint is an open-source code analysis tool that helps developers write cleaner, safer, and higher-quality code. While it's not necessary to use all SonarLint rules, the most important ones are enabled.
This code is converted to be compatible with the Arduino IDE and is placed in the arduino_ide folder as an Arduino project.
To add Seeeduino XIAO to your Arduino IDE:
- Click on File > Preferences
- Fill "Additional Boards Manager URLs" with the following URL: https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json
- Use your library manager to install the following libraries:
- Keyboard
- Mouse
- Simple Web Serial (confirm to install dependencies too, if asked)
- Arduino_Json
- FlashStorage_SAMD
- For STL files
- Seeeduino
- Home page project Multiplatform Morse Code Interface
- Online CW Multiplatform Morse Code Interface Configurator
- VBand
- PCW FistCheck
- Learn Morse Code online(LCWO)
- Morsecode.me
- Vail
- Morse Keyer V5.3
- MorsePower CWCom
- F6DM Cw Player
- LKMT: CW - Morse Code Reading Trainer
The Online Configurator will work with the following browsers:
- Chrome: Fully supports WebUSB. It also supports Web Serial API.
- Edge: Supports WebUSB.
- Opera: Supports WebUSB.
- Android browsers: Chrome for Android fully supports WebUSB.
Firefox doesn't support WebUSB or Web Serial API yet
It will work with the following desktop operating systems:
- Windows (>= 8.1)
- macOS
- Linux
- ChromeOS
You can use the interface with your smartphone, but you cannot use the online configurator on your smartphone.
While the Morse code interface uses the Keyboard.print() or Keyboard.press() command, the Arduino board takes over your keyboard! Make sure you have control before you use the command.
73 PE1HVH





