Home > Projects > Interfacing(USB – RS232 – I2c -ISP) Projects > Reddit Controller, USB Upvote/Downvote button

Reddit Controller, USB Upvote/Downvote button

Summary of Reddit Controller, USB Upvote/Downvote button


Summary: The author built a tiny Reddit Upvote/Downvote button using a Teensy USB-capable development board, a 3D-printed enclosure with arrow keys, and custom Teensyduino code to send keystrokes (CTRL+SHIFT+A and CTRL+SHIFT+Z) that trigger Reddit Enhancement Suite voting shortcuts. STL and Sketchup files were shared on Thingiverse.

Parts used in the Reddit Upvote/Downvote button:

  • Teensy development board
  • Makerspace/3D-printed project box enclosure (STL/Sketchup files)
  • 3D-printed up arrow (red plastic)
  • 3D-printed down arrow (blue plastic or colored with Sharpie)
  • Push buttons (for upvote and downvote)
  • USB cable (to connect Teensy to computer)
  • Computer with Teensyduino / Arduino IDE installed
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.

Reddit Controller - USB Upvote or Downvote button

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

Reddit Controller - USB Upvote or Downvote button circuit

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”).

 

For more detail: Reddit Controller, USB Upvote/Downvote button

Quick Solutions to Questions related to Reddit Upvote/Downvote button:

  • How does the device send upvote and downvote commands?
    The Teensy identifies as a USB keyboard and sends keystrokes: CTRL + SHIFT + A for upvote and CTRL + SHIFT + Z for downvote.
  • Can the Teensy work on both PC and Mac?
    Yes; because the board identifies itself as a USB keyboard it works when plugged into a PC or Mac with no additional software.
  • What software is required to program the Teensy for this project?
    You must use Teensyduino, which allows programming the Teensy using the Arduino programming language and IDE.
  • Do I need Reddit Enhancement Suite for the keystrokes to work?
    Yes; the keystrokes correspond to shortcuts you define in the Reddit Enhancement Suite.
  • How were the enclosure and buttons made?
    The enclosure and arrow keys were 3D-printed from STL/Sketchup files uploaded to Thingiverse.
  • Are the arrow colors important?
    The upvote arrow was printed in red and the downvote arrow in blue or colored with a Sharpie for visual distinction.
  • Can the project box size be adjusted?
    Yes; the author iterated designs and scaled the box to just fit the components before printing.
  • What key choices were used and why?
    CTRL + SHIFT + A and CTRL + SHIFT + Z were chosen to avoid conflicts with other programs instead of the default a and z.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top