Not too long back I observed the “Awesome Button” video clip on the make Magazine podcast. In the video Matt Richardson shows how you can take a Teensy advance board and also turn it into a straightforward USB keyboard. In his instance everytime a switch is pressed a synonym for words “awesome” is sent out to the computer. While this is a nice neat project the idea of developing a simplified key-board out of a couple of buttons is what stuck with me. This command me come start creating my “Reddit Upvote/Downvote button”.Reddit is a website that has actually in the past couple of months taken over my life. Not unlike Digg it aggregates every the best stuff top top the internet and makes it easy to consume. The means posts are sorted or carried to the front page on Reddit needs to do with the number of Upvotes and also Downvotes a short article gets over time. Currently while this voting choices are usually toggled through clicking arrow icons on the webpage castle can additionally be managed using keystrokes after installation the Reddit improvement Suite. After ~ I discovered this, all the stars aligned for my project.

You are watching: How to downvote on reddit with keyboard


*
*
*
*

I started by sketching out a straightforward design enclosure and also making some dimensions for the parts I plan on including. The Teensy advance board really is teensy therefore my job box came to be pretty tiny. In the gallery listed below you can see the evolution of the project box. I began off v a pretty huge box and scaled under to just huge enough to fit what i needed. The pretty amazing to be able to print a box that fits your specific project dimensions in about 30 minutes. I additionally printed up and also down arrows, the upvote arrow using red plastic and downvote colored blue with a Sharpie. As usual i have uploaded my most recent design to Thingiverse together STLs and also Sketchup files. These can be downloaded and printed in the comfort of your own home (assuming you own a 3D press of course).


*
*
*
*
*
*
*

Programming the keyboard features on the Teensy is surprisingly simple. There are an excellent instructions ~ above the Teensy development board page for sending keystrokes to your computer and because the plank identifies itself as a USB keyboard it works when plugged into a computer or Mac through no additional software! One note: to usage the USB key-board mode you should use the “Teensyduino” software program which permits you to routine the Teensy using the Arduino programming language and also IDE rather than the aboriginal Teensy language. I’ve had the password in complete at the bottom of the post, but to provide a quick overview, when the upvote switch is pressed the key mix “CTRL + shift + A” is sent to the computer over USB, an in similar way if downvote is pressed “CTRL + shift + Z” is sent to the computer. I identified these keystrokes in the Reddit improvement Suite manually due to the fact that they seemed prefer a key combination that wouldn’t conflict with other programs (default is “a” and also “z”).Above is a drawing of the circuit I placed together because that the buttons. As you deserve to see it’s really an easy and basically precise copy the the “Button” example on the Arduino website. I relocated the circuit from my breadboard to a scrap that circuit board I had actually left over from mine Arc Reactor project and also soldered everything down. Because I to be looking come fit this into a pretty tiny space my tolerances (wire length, etc) were also small. Lot to mine surprise every little thing worked top top my first attempt to move it come a perfect board. The just thing left to perform was reconnect the USB cord i snipped in half to fit right into my project box and also put a couple dabs of hot glue ~ above the lid to save it closed.

See more: What Is The Strength Of The Magnetic Field At The Center Of The Loop In The Figure


Below is a arsenal of video clip clips ns took while putting this job together. I think that turned out pretty nice and is a an excellent example that the various ways to change a previous job (yours or in this case, someone else’s the “Awesome Button”) right into something come fit your needs.

Below is the password I offered on my Teensy. It"s pretty easy to modify to fit your needs. You can find an ext information top top this project at mine blog http://thenewhobbyist.com/*Reddit Upvote/Downvote ButtonThis code sends the keystroke "CTRL + shift + A" or "CTRL + change + Z" to her PCor Mac. Make sure you collection your Arduino compatible plank to "Keyboard + Mouse" inthe "USB Type" menu. Hotkeys can be adjusted easily, I"ve added comments to do iteasier to find.For this to job-related with Reddit together an Upvote/Downvote switch you will should installReddit improvement Suite (http://reddit.honestbleeps.com/) and set your rise andDownvote hotkeys come the ones assigned in this Arduino sketch.Code examples edited and reworked from http://wwww.arduino.cc andhttp://www.pjrc.com/teensyTheNewHobbyist 2011 */// The entry you"re utilizing for button pressesconst int rise = 8; // Upvoteconst int downVote = 5; // Downvoteint upVoteStatus = 0;int downVoteStatus = 0;void setup() pinMode(upVote, INPUT);pinMode(downVote, INPUT);void loop()// inspect the buttonsupVoteStatus = digitalRead(upVote);downVoteStatus = digitalRead(downVote);// If Upvote switch is pressedif (upVoteStatus == HIGH) MODIFIERKEY_SHIFT);Keyboard.set_key1(KEY_A);Keyboard.send_now();Keyboard.set_modifier(0);Keyboard.set_key1(0);Keyboard.send_now();delay(500);// If Downvote button is pressedif (downVoteStatus == HIGH) // readjust the adhering to two currently to adjust the tricks sentKeyboard.set_modifier(MODIFIERKEY_CTRL