{"id":55,"date":"2025-10-07T10:12:34","date_gmt":"2025-10-07T09:12:34","guid":{"rendered":"https:\/\/blinkbonnie.xyz\/?p=55"},"modified":"2025-11-13T03:29:24","modified_gmt":"2025-11-13T03:29:24","slug":"keyboard-development","status":"publish","type":"post","link":"https:\/\/blinkbonnie.xyz\/?p=55","title":{"rendered":"Keyboard Development"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"816\" height=\"459\" src=\"https:\/\/blinkbonnie.xyz\/wp-content\/uploads\/2025\/10\/keypad2.jpg\" alt=\"Picture of the inside of a keypad on a desk with random electronic junk. There are wires leading from a PCB to a microcontroller and a speaker and a switch.\" class=\"wp-image-56\" srcset=\"https:\/\/blinkbonnie.xyz\/wp-content\/uploads\/2025\/10\/keypad2.jpg 816w, https:\/\/blinkbonnie.xyz\/wp-content\/uploads\/2025\/10\/keypad2-300x169.jpg 300w, https:\/\/blinkbonnie.xyz\/wp-content\/uploads\/2025\/10\/keypad2-768x432.jpg 768w\" sizes=\"auto, (max-width: 816px) 100vw, 816px\" \/><figcaption class=\"wp-element-caption\">I think I might have finally figured out about captions.<\/figcaption><\/figure>\n\n\n\n<p>I got to and did a bit more work on the keypad.<\/p>\n\n\n\n<p>Here you can see the inside of the keypad with the speaker switch in the top right corner of the case.<\/p>\n\n\n\n<p>It fitted nicely into the recess where the original keyboard\u2019s legs would have been, so from the outside it\u2019s out of sight unless you turn the keypad over.<\/p>\n\n\n\n<p>I had a bit of a problem with it. I\u2019d found a little slide switch, marked it out, drilled and filed a slot for the switch slider and, importantly, tested that the switch worked.<\/p>\n\n\n\n<p>After soldering the switch in and testing the continuity, I fitted the switch, closed up the case and plugged it in. No audio.<\/p>\n\n\n\n<p>I tried the switch in a couple of positions but still no audio and when I tested the continuity, well there was none. All the solder joints checked out but the switch wasn\u2019t contacting.<\/p>\n\n\n\n<p>So I found another switch, tested it, replaced the switch and plugged it in. No audio. Weird.<\/p>\n\n\n\n<p>I began to suspect the culprit wasn\u2019t the switch and unmounted it. Sure enough, the slider was not fully in the on position and when I slid it across all the way I got a good continuity reading.<\/p>\n\n\n\n<p>Turns out that the slot was too short on one end and the switch wasn\u2019t closing. A little bit of work with a file sorted that out and now I can switch the beeps and boops on or off as needed.<\/p>\n\n\n\n<p>The other thing I figured out was the USB storage that I wanted to not show up by default. I read online that there was a way, but after adding the code to read a button and optionally turn off the storage, it didn\u2019t work.<\/p>\n\n\n\n<p>Going back to the actual reference page for the storage module I discovered that the test should be done in a different file. I copied the code into boot.py and it worked \u2013 the drive didn\u2019t show up on boot.<\/p>\n\n\n\n<p>I was all set to try adding a pushbutton to the case but noticed that the keypad already had a pile of buttons masquerading as keys. Instead of adding another button, which would have meant changing a connector, adding some header pins and drilling a hole etc, in boot.py I hard coded a read of the Enter switch by setting the row as the input and the column as an output pulled to logic low.<\/p>\n\n\n\n<p>Now, the storage medium can be mounted by holding down the Enter key while the keypad is being plugged in. Which is a lie, because I immediately changed it to the pause\/break key because using Enter meant that the Enter key was being pressed when the keypad finished booting.<\/p>\n\n\n\n<p>Actually, what I\u2019ll do is add another test to pause boot.py until the key is released before exiting. That\u2019s sensible.<\/p>\n\n\n\n<p>Originally written <a href=\"http:\/\/10.1.1.201\/index.php\/2025\/09\/30\/keyboard-development\/\">September 30, 2025<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I got to and did a bit more work on the keypad. Here you can see the inside of the keypad with the speaker switch in the top right corner of the case. It fitted nicely into the recess where the original keyboard\u2019s legs would have been, so from the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":56,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-55","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/blinkbonnie.xyz\/index.php?rest_route=\/wp\/v2\/posts\/55","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blinkbonnie.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blinkbonnie.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blinkbonnie.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blinkbonnie.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=55"}],"version-history":[{"count":1,"href":"https:\/\/blinkbonnie.xyz\/index.php?rest_route=\/wp\/v2\/posts\/55\/revisions"}],"predecessor-version":[{"id":57,"href":"https:\/\/blinkbonnie.xyz\/index.php?rest_route=\/wp\/v2\/posts\/55\/revisions\/57"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blinkbonnie.xyz\/index.php?rest_route=\/wp\/v2\/media\/56"}],"wp:attachment":[{"href":"https:\/\/blinkbonnie.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=55"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blinkbonnie.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=55"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blinkbonnie.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}