The 0.96% Keyboard
The why?
Why was this project actually created?
Browsing /r/MechanicalKeyboards on reddit, you will now and then see some
keyrings, and people in the comments will mention how it could be awesome if that keyring actually worked.
So I decided to make that happen. It had to have 1 key, and preferably fit under the switch.
Then I figured, why make it only one userselectable letter? "Why not make it a morse code keyboard?" And that's how this happened.
Is it usefull? Nope! Was it fun? Yep!
The code
And of course, this won't work without some code.
For this project, I bootloaded the ATTiny85 with the micronucleus bootloader
I used the latest version, which at the time of writing was 1.11
This will allow us to upload programs over usb, which will be much easier, due to the lack of space for an ISP header on the board.
I then used the Morse-EnDecoder library. A rather impressive
Library, which can encode and decode morse-code simultaneously, I used this for decoding the morse input.
And the last library that I used was the DigiKeyboard library, a library that I can't seem to find a download for, other than getting Digistumps version of the arduino IDE
which really isn't too big of an issue, as you will need it to upload the sketch anyways (Unless you use the command line program for uploading .hex files to the chip)
Then it was just a few lines of code, taking the output of the morse-code decoder, and stuffing it in to the keyboard library, and tadah!
The files
And here's the fils for the project