ButtonHero using Arduino

ButtonHero is a game made on an Arduino that involves the use of buttons, LEDs, wires, and resistors. In this game, you have to hit the corresponding button to the light that is randomly selected before the light changes. You start with 5 lives and missing or being too slow subtracts one life. The high score is 56. Good luck!

ideo of the Serial Monitor of the same game: http://screencast.com/t/PTaS3JwUu

Arduino ButtonHero


Step 2: Schematic

Here is the schematic for ButtonHero. The Fritzing file is also attached.


Step 3: The Code

Attached is the Arduino code file.

int ledDelay; // LED timeout
int score; // points you get
byte currentLed; // the one that is lit up right now
boolean started; // Are you playing the game?
boolean needNewLed = true; // we need a new LED
byte health = 6; // health remaining
boolean updateScreen=true; // do we need to update the screen?
boolean lostHealth=false; // do we need to subtract one from the health?


Major Components in Project

Step 1: Supplies

Supplies include:
• 4 LEDs
• 4 pushbuttons
• 1 Arduino (we used a Dueilanove)
• 4  8.2kΩ resistors
• 4  100Ω resistors
• 4  0.56kΩ resistors
• lots of wire

For more detail: ButtonHero using Arduino

This Post / Project can also be found using search terms:

  • arduino breadboard button hero
Clip to Evernote

Leave a Comment

(Spamcheck Enabled)

Read previous post:
Educational colorimeter kit
Educational colorimeter kit

This instructable is a step-by-step assembly guide for the educational colorimeter kit we launched in April 2012 on Kickstarter. Assembly...

Scroll to top