Jeopardy Buzzers

Jeopardy Buzzers

Jeopardy Buzzers

Arduino (ESP8266) / Roku

GitHub repo →

Growing up, my family played Jeopardy every night. We watched it live and shouted out answers, keeping a tally on a notepad throughout the game. I had always wanted to play with a Jeopardy “buzzer” (clicking a pen really isn’t the same), so I decided to build my own.

The buzzers work by communicating with a Roku over WiFi. While the episode is playing, whenever a player presses their buzzer’s button, the Roku will pause. At the same time, a light on the buzzer that was pressed first begins to flash. The flashing gets progressively faster until finally, the TV unpauses. The person whose buzzer lit up (whoever buzzed in first) must say the answer before the TV unpauses. To speed up the game a bit, the person answering may also unpause before time is up by holding down the button on their buzzer after answering.

The Code

Having zero experience with C++, Arduino, or any kind of hardware going into this project, my goal was just for the buzzers to work. There very well might be a more elegant or efficient way to write the code, but since this was just a prototype to use with my friends, I wasn’t too worried about that.

So, the code is fairly simple.

I hardcoded the WiFi network / password, along with the IP address of my Roku. I’ve brought it a few different places and just updated the code each time, plugging those in.

The pins are set (e.g. WHITE_BUTTON_PIN or WHITE_LED_PIN).

turn_phase is initialized as 0 and answerer is initialized as an empty string.

In turn_phase 0, no one has buzzed in. While in this phase, if anyone buzzes in, answerer is set to the color of that buzzer and turn_phase is set to 1.

In turn_phase 1, someone has buzzed in and is giving a response. They have 6 seconds to do so. Their buzzer’s LED is flashed on and off twice over the course of the first two seconds, then four times over the next two seconds, then eight times over the next two seconds. The user can hold down the button after they answer, to unpause the TV. This works by checking at second 1, 3, and 5, whether their button is pressed — if it is, the TV is unpaused and turn_phase is set back to 0. This helps move the game along when people answer quickly. Otherwise, after 6 seconds, the TV is unpaused automatically and turn_phase is set back to 0 so that other players can buzz in if the first person didn’t answer in time.

The Build

Materials

Breadboard

Breadboarding wire (or spool)

Adafruit Feather HUZZAH with ESP8266 With Headers

Lithium Ion Polymer Battery

16mm Illuminated Push Button (Red / Orange / White / Green)

Arcade Button Quick-Connect Wire Pairs (10-pack)

(4) 10k ohm pull-up resistors

(4) 330 ohm pull-up resistors

3/4” x 5ft PEX-B Pipe

Board setup

I chose the Adafruit Feather HUZZAH with ESP8266 for my board. It has WiFi and can be powered by Adafruit’s 3.7V Lithium polymer batteries. I wanted 4 buzzers and needed two GPIO pins per buzzer — one for the LED and one for the button — and this board enough for that (it has 9). Adafruit’s documentation for the board is detailed and makes setup easy.

After installing or updating the Arduino IDE, follow Adafruit’s instructions to install all the software necessary to get the board working with your Arduino IDE. This includes installing software for the board and the SiLabs CP2104 Driver.

Open a new sketch, paste the code from jeopardy_buzzers.ino and replace the placeholder WiFi network/password with your own. On your Roku, go to Settings > Network > About to find the Roku’s IP address. Replace that in the sketch as well.

Connect your computer to your board with a USB cable, then make sure you’re able to choose “SLAB_USBtoUART” as your port (as shown in Adafruit’s instructions at the link above). Once that’s selected, and assuming you’ve done everything else at the link above, just click the Upload button in your Arduino IDE and the board should be good to go.

Hardware setup

To make my buzzers easy to hold, I cut the PEX pipe into ~4 inch pieces. The inner diameter is just lightly too small for the push button to fit inside (with the screw part tightened fully), so you can use a drill to sand down one side slightly until you can insert the push button snugly.

Next, take the button back out and connect the Quick-Connect Wire Pairs. The bottom of the arcade button looks like this:

image

The slightly smaller contacts on top are for the LED, and the bigger contacts on the bottom are for the push button. Connect the Quick-Connect Wire pairs and mark +/- for the LED.

image

Feed the wire through the PEX pipe and push the button in. I opted not to glue it since I figured I might update the connection to be a bit more secure down the road.

Do that for each of the push buttons, and then start connecting everything to your breadboard. Here’s the breadboard layout:

https://images.spr.so/cdn-cgi/imagedelivery/j42No7y-dcokJuNgXeA0ig/59b8565c-bfd1-4c32-adcc-8205467a7a39/Game_Buzzers_Prototype_v1_bb/w=1920,quality=80

Begin by connecting the ESP8266 board itself to the breadboard as shown above. Then, add the connections for power and ground as shown in the bottom left of the breadboard above.

If you want to use the code as is (with the same pins going to the same color buzzers), start with your white buzzer circuit close to the board, then work your way away from the board and add the circuits for the red, orange, and then yellow buzzers, as shown above.

The LED circuit is simple:

  1. LED (-) > Ground
  2. LED (+) > 330k ohm resistor > GPIO pin #14

For the button circuit, the easiest thing to do is just follow the schematic. It shouldn’t matter which button contact goes where, as long as the circuit is completed as shown.

The code is written assuming you are using pull-up resistors, so that the board reads LOW when the button is pressed and HIGH when not pressed. If you use pull-down resistors, you’ll need to edit the code to reflect that. The resistors in the LED circuit are 330 ohm here, but anything from 220 to 1k ohm should work. The resistors in the button circuit are 10k ohm.

If you want to use the battery, just plug it into the board and charge it using the USB port. You can also just power it through the USB port without a battery.

image
It’s fragile with the short jumper cables strung together — eventually, I’ll cut wire to length and encase them.
It’s fragile with the short jumper cables strung together — eventually, I’ll cut wire to length and encase them.
Quality control
Quality control

That’s it. Just find Jeopardy on any Roku app, turn it on, and the buzzers will work.