Not too long ago I saw the “Awesome Button” video on the Make Magazine podcast. In the video Matt Richardson shows how you can take a Teensy development board and turn it into a simple USB keyboard. In his example everytime a button is pressed a synonym for the word “awesome” is sent to the computer. While this is a pretty neat project the idea of creating a simplified keyboard out of a few buttons is what stuck with me. This lead me to start creating my “Reddit Upvote/Downvote button”.
Reddit is a website that has in the past few months taken over my life. Not unlike Digg it aggregates all the best stuff on the internet and makes it easy to consume. The way posts are sorted or brought to the front page on Reddit has to do with the number of Upvotes and Downvotes a post gets over time. Now while these voting options are usually toggled by clicking arrow icons on the webpage they can also be controlled using keystrokes after installing the Reddit Enhancement Suite. After I found this, all the stars aligned for my project.
Step 1: Makerbotting a project box
I started by sketching out a basic design enclosure and making some measurements for the parts I planned on including. The Teensy development board really is teensy so my project box ended up being pretty tiny. In the gallery below you can see the evolution of the project box. I started off with a pretty large box and scaled down to just big enough to fit what I needed. It’s pretty amazing to be able to print a box that fits your exact project dimensions in about 30 minutes. I also printed up and down arrows, the upvote arrow using red plastic and downvote colored blue with a Sharpie. As usual I’ve uploaded my most recent model to Thingiverse as STLs and Sketchup files. These can be downloaded and printed in the comfort of your own home (assuming you own a 3D printer of course).
Step 2: Circuit design and Teensy programming
Programming the keyboard functions on the Teensy is surprisingly simple. There are great instructions on the Teensy development board page for sending keystrokes to your computer and because the board identifies itself as a USB keyboard it works when plugged into a PC or Mac with no additional software! One note: to use the USB keyboard mode you must use the “Teensyduino” software which allows you to program the Teensy using the Arduino programming language and IDE rather than the native Teensy language. I’ve included the code in full at the bottom of the post, but to give a brief overview, when the upvote button is pressed the key combination “CTRL + SHIFT + A” is sent to the computer over USB, likewise if downvote is pressed “CTRL + SHIFT + Z” is sent to the computer. I defined these keystrokes in the Reddit Enhancement Suite manually because they seemed like a key combination that wouldn’t conflict with other programs (default is “a” and “z”).
I am an experienced technical writer with a Master's degree in computer science from BZU Multan University. I have written for various industries, mainly home automation, and engineering. I have a clear and simple writing style and am skilled in using infographics and diagrams. I am a great researcher and is able to present information in a well-organized and logical manner.
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.ACCEPTCheck Privacy Policy
Manage consent
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.