Monday, April 28, 2025

VBand interface to Physical Morse Key

-----

What is VBand?  It's a virtual CW Band where you can have a virtual Morse Code QSO as well as practice your CW skills.  It doesn't require a ham radio rig.  It doesn't require a ham radio license.   It's not ham radio, but it is popular and a great place for some none RF fun.

-----

First things first; this problem has been solved over and over.   Our frustration was finding a one stop site that provided clear instructions on how to interface a Morse Key to the VBand website.  Also, there are several VBand interfaces for sell that reports suggest "just don't work".   If you decide DIY is not for you then be safe and make your purchase directly from the VBand store.

----

Bill of Materials and Hookup (~$10USD):

-----
Of course, before anything works you will need to use the Arduino IDE to upload the software below to the Arduino Pro Micro.   
 
//This program acts a USB interface for a CW paddle or straight key for VBand Virtual CW Band.
//Program written by Tony Milluzzi, KD8RTT using Keyboard library example as starting point.

// WhiskeyTangoHotel.com notes APRIL 2025:
//       IDE Board Selection: Ardunio Micro (but my board is labeled Pro Micro)
//       The VBand web address is: https://hamradio.solutions/vband/
//       Select Speed, keyer type, etc. on the VBand website 'Settings" section

#include "Keyboard.h"

//declaring paddle input pins
const int dah = 3;          
const int dit = 2;

int previousdahState = HIGH;
int previousditState = HIGH;


void setup() {
  //declare the inputs as input_pullup
  pinMode(dah, INPUT_PULLUP);  
  pinMode(dit, INPUT_PULLUP);  
  Keyboard.begin();
}

void loop() {
  //checking the state of the inputs
  int dahState = digitalRead(dah);
  int ditState = digitalRead(dit);

 
 //replaces left paddle input with dit using "[" as defined by VBand website
  if (dahState == LOW && previousdahState == HIGH) {
      // and it's currently pressed:
    Keyboard.press(93);
    delay(50);
  }
  if (dahState == HIGH && previousdahState == LOW) {
      // and it's currently released:[[[[]]]]
    Keyboard.release(93);
    delay(50);
  }
 
 //replaces right paddle input with dah using "]" as defined by VBand website
  if (ditState == LOW && previousditState == HIGH) {
      // and it's currently pressed:
    Keyboard.press(91);
    delay(50);
  }
  if (ditState == HIGH && previousditState == LOW) {
      // and it's currently released:
    Keyboard.release(91);
    delay(50);
  }

  previousdahState = dahState;
  previousditState = ditState;
}
 
-----

At this point everything should "just work".  However, there are some VBand setting you can adjust. The settings are obvious, but we will highlight two here:

-----

Provided you have used the Arduino IDE before to upload code the whole project should take only a few minutes.   Enjoy VBand, practice up, and hope to see you on 'real' airwaves.

-----