2023-06-16 (F) Weekly Summary

I used CAD to draft the schematic and kept the keys arranged as they are on the physical model. To save time, I used reference tags instead of tracing the wires individually. The function buttons get dedicated inputs instead of positions on the diode matrix.
Schematic (click to enlarge)

I tested the Bluetooth connection using Adafruit's atcommand.ino and "Bluefruit Connect" app. Then, I experimented with hidkeyboard.ino to type on my phone from my computer. I made a list of all the button positions and their corresponding keys.
My phone sees a keyboard

I had trouble getting my phone to recognize my keyboard, but my computer did. I had to modify the code from a second keyboard tutorial to send keys periodically instead of switches. Programming the bottom row was tricky due to modifier keys. I found a document with button codes, but had to play around with the sketch to figure out how to send them. I had to replace three volume keys with uncommon function keys. The third, fourth, and fifth rows went smoothly. I tested the layout with an online utility and when I retested with my phone, it worked!
White keys worked

I updated my keyboard's modifier keys and regular keys to toggle relevant bits and search for available slots. I can now send up to six keys at once, but there's a noticeable delay and sometimes missed keys if I type too quickly. I turned off serial monitoring, but may add an interrupt pin from the IO expander to fix the scanning issue.
New key presses find a vacant spot

I found that my typing delays and missed keys were caused by sending Bluetooth commands each time a key changed position. I modified the program to send commands once at the end of each scan. I also had trouble placing guitar strap connectors due to unthreaded aluminum tubing, but I found a solution using thread reducers and plastic end caps.
Guitar buttons on the aluminum ends

I added four buttons to the keyboard's neck using plywood plates and spacers. They fit together well and feel sturdy, but the keyswitch terminals are exposed.
Offhand keyswitches

The rest of the summary posts have been arranged by date.
First time here?

Completed projects from year 1
Completed projects from year 2
Completed projects from year 3
Completed projects from year 4
Completed projects from year 5
Completed projects from year 6
Completed projects from year 7
Completed projects from year 8

Disclaimer for http://24hourengineer.blogspot.com and 24HourEngineer.com

This disclaimer must be intact and whole. This disclaimer must be included if a project is distributed.

All information on this blog, or linked by this blog, is not to be taken as advice or solicitation. Anyone attempting to replicate, in whole or in part, is responsible for the outcome and procedure. Any loss of functionality, money, property, or similar, is the responsibility of those involved in the replication.

All digital communication regarding the email address 24hourengineer@gmail.com becomes the intellectual property of Brian McEvoy. Any information contained within these messages may be distributed or retained at the discretion of Brian McEvoy. Any email sent to this address, or any email account owned by Brian McEvoy, cannot be used to claim property or assets.

Comments to the blog may be utilized or erased at the discretion of the owner. No one posting may claim property or assets based on their post.

This blog, including pictures and text, is copyright to Brian McEvoy.

Comments