The Reddit Votelet

by Rockwell Schrock (user Schrockwell) —

What the heck?

The Reddit Votelet is a system for getting real-time, real-world feedback of a user's interaction with Reddit.com. It uses several layers of applications to interpret a user's actions in a Web browser and pass on that event on to a microcontroller.

In terms I can understand, please?

You click upvote, and something lights up. You click downvote, and something else lights up. You get a new orangered, and still another indicator illuminates. Check out the video. It's awesome, trust me.

This particular implementation uses the traffic light hack as a basis for relaying information, but it can also be implemented more simply by using LEDs (source available below).

Flow Diagram

How it works

  1. Upon page load, the Greasemonkey script registers itself with the mouseclick event of all the upvote and downvote links on the page. It also checks for an orangered.
  2. When an orangered (or gray) is detected, or a user clicks on an upvote/downvote link (either a comment or a story), the script sends an HTTP request to a locally-running Web server.
  3. The Web server interprets the request and passes on the command to an Arduino microcontroller over a USB serial connection.
  4. The microcontroller interprets the command string and illuminates or flashes the appropriate lights by toggling output pins. The pins can be used to control LEDs or switches for higher-voltage lights.

Downloads

LED lights

Traffic Light

See the Traffic Light Hack Mark II site for more traffic-light-specific downloads.