Instructables
Picture of Arduino Rock-Paper-Scissors
Here's my version of the classic Rock-Paper-Scissors game, but it's just you against the ATMEGA328P-PU. The scorekeeper is across the top with a yellow LED for even, green LED's for the player, and red LED's for the chip. If one side gets 5 up on the other, the scorekeeper flashes for the winner. The middle Rock-Paper-Scissors LED's indicate each side's play. For now, the micro tries to just randomly pick a play, but the plan is to have it reading my mind down the road.

The version I built here is a stand-alone board, but I used the Arduino software for programming and the game can also be built using an Arduino UNO board.

Step 1: Parts and Tools

Picture of Parts and Tools
You can build this project using an Arduino UNO or MEGA and a breadboard, but here are the parts I used to build the stand-alone game.

Parts:
  • (1) White Bread Shield for Arduino (Tinkineering)
  • (1) Atmel ATMEGA328P-PU (Digikey)
  • (1) 28-Position DIP Socket (Digikey)
  • (1) 16MHz Crystal (Digikey)
  • (2) 22pF 50V Capacitor - Ceramic (Digikey)
  • (1) 1M-Ohm 1/4W Resistor (Digikey)
  • (1) Power Jack (Digikey)
  • (1) 1N4001 Diode (Digikey)
  • (1) 5VDC 1A Voltage Regulator (Digikey)
  • (1) 0.1uF 50V Capacitor - Aluminum (Digikey)
  • (1) 0.33uF 50V Capacitor - Aluminum (Digikey)
  • (2) 0.1uF 50V Capacitor - Ceramic (Digikey)
  • (4) SPST Tactile Switch (Digikey)
  • (4) 10k-Ohm 1/4W Resistor (Digikey)
  • (8) 3mm Green LED (Digikey)
  • (7) 3mm Red LED (Digikey)
  • (1) 3mm Yellow LED (Digikey)
  • (16) 220-Ohm 1/4W Resistor (Digikey)
  • Hook-Up Wire
  • Card Stock for Faceplate

Tools:
  • Wall Wart Power Supply - If you have one that works with the Arduino UNO, your power supply will work with the power jack listed above.
  • Soldering Iron and Solder
  • Wire Cutters for Trimming Leads
  • Wire Strippers for Hook-Up Wire
  • Scissors and a Hole-Punch for the Faceplate
 
Remove these adsRemove these ads by Signing Up
ElMoto9 months ago

Version #2 should include "lizard" and "Spock." :D

maewert9 months ago

Very nice instructable!

You can get rid of the pull - down 10k resistors on the pushbuttons by using the internal pull-up resistors within the ATMEGA328P chip and having the pushbutton ground the input pin instead and reversing the logic in software. Just would eliminate the need for three 10K resistors!

In any event, a very nice instructable!

Best Wishes

Tinkineering (author)  maewert9 months ago

Thanks for the feedback and the tip. I'll have to keep that in mind on the next project.