Sociable Objects - Rock Paper Scissors
If you ever felt like Rock Paper Scissors was too easy to play.
For this assignment, Armanda and I each built a circuit with an Arduino, an XBee radio, four switches, and several LEDs to play the game Rock Paper Scissors.
Play proceeds as follows: one player selects a choice using one of the switches, the choice is transmitted to the other player, an LED lights up on the other player’s board to indicate to the second player that the first player is waiting to receive a choice from the second player, the second player chooses a score that is transmitted to the first player, and when each player has the other players score a light indicates what the other player has chosen. An additional light on each board indicates the winner — if there is a tie then both lights are on, otherwise thxe winner is the player with the illuminated light, and either player can press a New Game switch to reset his own game and tell the other player to reset.
We extended the project to build a third circuit to keep score of the game. A third Arduino and XBee were used with a modification of the Binary Counter project I had built before. Each board keeps track of its own score and transmits that score to the scorekeeper when the New Game button has been pressed. Scores up to 16 for each player are indicated on two sets of four LEDs.
The Arduino code for each the two players is online here, and the code for the scorekeeper is online here
Video with scorekeeper:
Video without scorekeeper: