HAM Radio ZendExamens Banner  [ Welkom ]  [ Het waarom ]  [ Examens ]  [ Morse sectie ]  [ QTH Locator ]  [ Lijsten / Tabellen ]  [ Referenties ]  [ Link Sectie ] 
Home » Morse Code Interface

Nederlandse tekstNederlandse tekst

Configurable USB/HID Morse Code Interface

Introduction

The Configurable USB Morse Code Interface for LCWO, PCWFistCheck, VBand, etc. In collaboration with the Online Configurator , this low-cost interface allows you to use your favorite Morse key with various programs and apps, instead of relying on a mouse or keyboard.

It uses a compact Arduino-based microcontroller, the Seeeduino XIAO SAMD21, along with some additional hardware.

Please note that not all browsers support WebUSB. Refer to the Browser Support section in this doc for more information.

How it works

When the interface is connected to a USB port, the interface program waits for an initial key press (from the Morse key).

The Online Configurator will prompt you to select the correct USB device/port (in this case, the Seeeduino XIAO).

Make a connection with USB Device Make a connection with USB Device Make a connection with USB Device

Once the connection is established, you can specify the type of Morse key and configure the interface for:

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):

The configuration will be stored in the interface's permanent memory.

Configuration Examples

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

Hardware/STL File

This project only needs a micro jack, some wire, a USB-C/USB cable, and of course a Seeeduino XIAO SAMD21.

image

For this project, pins 6,7 and ground are used.

image

The STL files for the 3D-printed Seeeduino case can be found on morse-code-usbhid-interface-the-gadget.

image

Software Seeeduino XIAO SAMD

The software can be found on GitHub repository Configurable Morse Code Interface. See the Readme.doc for the details.

Visual Code and PlatformIO

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.

SonarLint

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.

ArduinoIDE

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:

Use your library manager to install the following libraries:

  1. Keyboard
  2. Mouse
  3. Simple Web Serial(confirm to install dependencies too, if asked)
  4. Arduino Json
  5. FlashStorage SAMD

Browser support

The Online Configurator will work with the following browsers:

Firefox doesn't support WebUSB or Web Serial API yet

OS support

It will work with the following desktop operating systems:

You can use the interface with your smartphone, but you cannot use the online configurator on your smartphone.

Notes and Warning

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