Arduino Keyboard library not working on Debian KDE

Man, I just spent quite a bit of time diagnosing this particular issue.

The problem was that my Symbol Keyboard stopped working. This is a USB keyboard I made from an Arduino Leonardo. The touch screen was working okay, but the keypresses weren’t being delivered over USB.

Long story short, the 7-port USB 3.0 hub attached to my workstation needed rebooting! I disconnected the power supply and disconnected the upstream USB cable to remove both sources of power, then when I reconnected everything my stuff started working again, including my symbol keyboard.

Lesson learned: if you’re debugging a USB device failure try plugging the device directly into the host to avoid any potential issues caused by your hub(s).

It was lucky I had a spare 104-key USB keyboard in the cupboard because I needed one while diagnosing this issue (the Windows box I was using only has a tenkeyless 87-key keyboard plugged into it but the Windows alt-key codes require use of the number pad).

The latest incarnation of my symbol keyboard looks like this:

John's symbol keyboard

Debugging

I’ve been reading Debugging: The 9 Indispensable Rules for Finding Even the Most Elusive Software and Hardware Problems. My mate @indigo suggested I read David A. Wheeler’s summary of it over here: David A. Wheeler’s Review of Debugging by David J. Agans. I know David A. Wheeler from his work on sloccount.

AliExpress diodes

I ordered a bunch of SMD diodes from AliExpress (nine different types), and nine packages arrived, but they weren’t labeled. I tested everything to infer what I got, and they didn’t ship me what I ordered. My notes are here and the video of me doing all this is here.

I kept a note of the seller and will try to not order from them again. In the mean time I think I have filed the components that did arrive in the correct drawer.

Below are two happy snaps from this project. I guess on the bright side I got some practice doing SMD soldering and using my signal generator and my scope.

Oh, and I added a new item to my debugging notes, viz “is it plugged into the right socket?” (I had my output cable on the signal generator plugged into the wrong BNC connector on the device, that took some figuring out…)

John's test rig

John's test rig, labeled