Archive for the ‘Programming’ Category

Morse in a New Year

25 January 2018

One of the things I’ve done in the past few weeks is build a new keyboard for this computer. It’s what’s called a straight key in radio circles.

Telegraph key being used as a USB keyboard on my computer.

Yep, it’s real. And it works. I actually used it to type (key?) in some of this blog post. It’s literally just an USB cable, a Teensy 3.1, and a Morse code key. I’m going to mount the Teensy in the bottom of the board, but for now it’s on the protoboard until I get all my code changes done.

So, why? What the heck would I do that for when I have a perfectly good computer keyboard?

At the start of 2018 I was once again thinking I wanted to find a way to really make myself learn Morse Code. A way that would guarantee I would learn it.

Among other times, I want to use my mobile radio when I’m out and about but don’t have the computer with me. Normally, I use PSK-31 which is computer-to-computer via amateur radio. For that, obviously, I have to have a laptop with me. The thing is, I don’t always have one with me and sometimes I will be out in the Owyhees at a spot where I’d like to see if I can have a QSO (conversation) on the radio. No laptop, no QSO.

The obvious question is, why don’t I just sit down and learn it?

Well, I could, but I’m lazy and I know it. Also, I already know about half the alphabet and numbers and a punctuation mark or two. So, what’s the problem? It’s no fun for me just sitting and memorizing the International Morse Code. I can, but that’s boring.

I began to wonder if I could somehow replace my QWERTY keyboard with a straight key. I took the path of least resistance and started searching online to see if anyone had done something like this with an Arduino or Teensy. It turns out several people had and made their code and schematics freely available.

After studying a few of them, I zeroed in on Nomblr’s rebuild of her dad’s old telegraph key. Her code was clean and the schematic about as simple as it ever gets so I leveraged off her work. The good thing was I happened to have a Teensy 3.1 in my “hell box” (as in “where the hell is it?”).

I dug out the Teensy 3.1, connected the straight key to the Teensy, plugged the USB cable into the Teensy and the computer. For testing, I simply downloaded Nomblr’s code to the Teensy, opened up Notepad++, and tried the key. I used the programmer’s holy first test: …. . .-.. .-.. — .– — .-. .-.. -..

To my immense pleasure, the letters started showing up in Notepad++ right away: hello world.

OK, so I had to look up two of those letters. That’s the whole point. I can now use the telegraph key to write on the computer, and to do so, I have to learn the Morse code letters I don’t know. Sure, it’ll be slow for a bit here and there but over the next few days or weeks I’ll be up to speed. And I’ll have learned the International Morse Code much faster than otherwise. Much.

I have already made some tweaks to her code and am in the process of adding some extra bells and whistles that I think will be useful to me. For example, I’ve added in a couple of prosigns like CQ and SOS. Keying in SOS, for example, corresponds to pressing F1 on a QWERTY keyboard. I’ve added in the punctuation from the International Morse Code table, and I’ve set up “……..” which is Morse for “error” to mimic pressing the backspace key on a regular keyboard.

Now I’ve got a fun and productive way to learn Morse code. One that not only ensures I’ll learn it, but also lets me practice sending and have fun doing so.

Soon, I’ll be on the airwaves with CW.

Future tweaks to this setup include adding a way to adjust the words-per-minute of the program. Currently it’s hard-coded and to change it to work smoothly with a faster or slower WPM I have to modify the code and dump it to the Teensy. Not difficult, but also not ideal, especially as my speed improves.

I do want to increase my speed, but one caveat is that I need to ensure that I don’t send faster than I can receive. For that reason, among others, another mod is to add a display to show what my actual WPM is as I use the key.

As to why a straight key instead of an iambic paddle…I’m of German descent, which gives me a Stubborn bonus of +4. 😉


This Past Two Weeks

23 October 2013

These past two weeks haven’t seen much happening in my main interests. Even though I’ve done stuff, it’s just been mostly maintenance and planning. Today I’ll be providing an update on three areas: Writing, Photography, and Programming.


I’ve made all the recent Beta requested changes I’ve decided to implement. I still need to meet with one Beta to get some clarifications but I think for now I’m just about ready to release D6.

This includes a name change to address the comments of some Beta readers regarding the new antagonist. She will be returning in the future, I’m sure, so getting the name right in this first appearance means not having to change it in previous short stories. I’ve not made any of the suggested changes but came up with one I like. We’ll see how that goes over in the next round.

It also means that I’ll probably need to post at least a partial guide to pronunciation regarding certain words. So, here is some more…

To wit: when two identical characters are separated by an apostrophe, both characters are to be enunciated the same. Generally, this will only come into play when vowels are involved, consonants tend to sound the same when repeated anyway. The major point here is that both must be said.

Thus, Bret’thad isn’t pronounced as Bret-thad but rather as Bret-t-had. Similarly, Bri’ier would be pronounced as Bri-ie-er with that last part like the er in her. And naturally Pa’adhe is Paw-aw-d-he.

I’m still tweaking the full pronounciation guide so this might change slightly but I think this part’s pretty solid.

I’ve also started putting together the Encyclopaedia Pa’adhe, which is the working title for now. I’ll probably eventually replace Pa’adhe with the name of the world as soon as I can remember what it was. I had figured out what I wanted the name to be for the world of Pa’adhe but unfortunately I did that on the drive in to work, and so didn’t write it down. I know it started with a B…. Eventually, I’ll remember or come up with a new name, but dang, I wish I could remember it, it was pretty good if I do say so myself.


While I’ve not done any actual photography, despite nice weather and everything, I’ve not been ignoring this interest either. I’ve been working on a script for a video tutorial involving The GIMP. I tried to explain to a couple of people how to create a picture with multiple images of the same kid in it, but didn’t do so very well in either verbal or written media. So, I’m going to create a small video that takes the user through the requirements of the photographic session to the end product via The GIMP.

Interestingly enough, I hit a conundrum with this project. I’m deaf, completely and totally, as I’ve mentioned before. I will eventually be releasing this video via this blog, which means I need to consider a wider audience than I have so far.

The conundrum?

I was going to create it with my wife doing the voice-over. Then I got to thinking that it irritates me that YouTube and others don’t caption or provide proper subtitles (the automatic captioning provided is a joke. A JOKE, you hear? I’d be laughing if I wasn’t crying.). So I thought I would get revenge by subtitling everything and not doing audio. I’d do it so you had time to read the subtitles before seeing the corresponding action. Then I remembered I have some friends for whom English is a second language and more difficult to read than to listen to, apparently. So, what to do? The only correct solution is to do both.

I’ll be using Camtasia Studio 8 for this project, and not having really worked with it before, I don’t know if I can make the subtitles optional or not. They’re defintiely a requirement, since after all, if I’m pissed at all the poor captioning out there I should help set the bar rather than not provide any solution.

The only reason for using Camtasia Studio is that I was given a copy recently and it seems to be better for what I want to do than Adobe Captivate, which I already have. Admittedly, I’m no more familiar with Captivate than I am Camtasia. So, we’ll see…I just might do it both ways to see if the two packages are similar in capability. With my limited research thus far it appears Camtasia has the better post-production package with fly-outs, and other nifty candy.

No, I have not yet taken my photo for the October Pentax Forum Contest.


I’ve been working, a little here and a little there, on my programming in both Arduino and Android. I finished my Arduino program, just because I could, and set that aside. The Android program has been more time involved for a couple of reasons.

Although I’ve created several Android apps and given them to people, I did not truly have an understanding of the app architecture. So this time I’m not only working on an Android app for a few people, I’m also studying the internal structure of the app package in more detail as I go along. Essentially, I’m creating two apps at the same time: one is the hands-on programming tutorial part of the book I’m using and the other is the actual app I’m creating.

The result is that I have a much more complete understanding of the file structure and how the various directories relate to each other. I better understand, now, where the various parts, as files, of the app go, for example in the res, bin, assets, etc. folders.

With the Arduino project finished, I can now focus completely on this Android programming and move much faster through this particular Android project.