Build a Rock, Paper, Scissors Robot That Always Plays Back!

Build a Rock-Paper-Scissors Robot with Servo Motors | Fun DIY Robotics for Kids
✊ ✋ ✌️

Build a Rock, Paper, Scissors Robot That Always Plays Back!

A beginner-friendly robotics project using servo motors and Arduino — perfect for young makers who want to build something that actually moves, reacts, and plays a game with you!

🎓 Beginner Friendly ⏱️ 2-3 Hours 🔧 Servo Motors 💻 Arduino Code Included

1How Does a Rock-Paper-Scissors Robot Work?

Our robot has a single mechanical "hand" — a 3D printed or cardboard hand attached to a servo motor — that can move between three positions: a closed fist for Rock, a flat hand for Paper, and two fingers for Scissors.

When you press a button, the Arduino picks a random move, rotates the servo to show that shape, and lights up an LED to announce the result. Since the robot always reacts the moment you hit the button, it feels like it's really playing against you!

Rock — 0°
Paper — 90°
✌️
Scissors — 180°
Fun fact: A servo motor is a small motor that can rotate to an exact angle (instead of spinning forever like a fan motor). That's exactly what we need to flip our robot hand between three precise positions!

2Materials You'll Need

Arduino Uno (or Nano)
SG90 Micro Servo Motor
Push button
Red LED
Green LED
220Ω resistors
10kΩ resistor (or use INPUT_PULLUP)
Breadboard
Jumper wires
Cardboard/3D printed hand cutout
USB cable for power

No 3D printer? No problem — a hand shape cut out of cardboard or foam board taped onto the servo arm works perfectly for this project.

3Wiring the Circuit

Servo Motor

Servo WireConnects To
Orange (Signal)Arduino Pin 9
Red (Power)Arduino 5V
Brown (Ground)Arduino GND

Push Button

Button PinConnects To
Leg 1Arduino Pin 2
Leg 2Arduino GND

LEDs

LEDConnects To
Red LED (+) → 220Ω resistorArduino Pin 7
Green LED (+) → 220Ω resistorArduino Pin 8
Both LED (–)Arduino GND
Tip: Resistors protect your LEDs from too much current, kind of like a speed bump that keeps electricity flowing at a safe pace.
Safety first: Always double-check wiring before plugging in your Arduino, and ask an adult for help with cutting, soldering, or using sharp tools.

4Step-by-Step Build Instructions

1
Attach the hand to the servo. Glue or tape your cardboard/3D printed hand onto the servo's rotating arm so it points straight up.
2
Mount the servo. Secure the servo to a small wooden block or sturdy cardboard base so it stands upright on the table.
3
Wire the servo to the Arduino following the table above, plugging signal into Pin 9.
4
Add the push button on the breadboard, wired into Pin 2 and ground.
5
Add the LEDs with their resistors, into Pins 7 and 8.
6
Connect the Arduino to your computer with a USB cable, ready to upload the code.

5The Arduino Code

This code waits for the button press, picks a random move, rotates the servo to show it, and blinks the green LED to celebrate. Copy it into the Arduino IDE and upload it to your board.

// Rock-Paper-Scissors Robot
// Moves a servo hand to a random gesture when the button is pressed

#include <Servo.h>

Servo handServo;

const int buttonPin = 2;
const int redLED = 7;
const int greenLED = 8;
const int servoPin = 9;

const int ROCK = 0;
const int PAPER = 90;
const int SCISSORS = 180;

void setup() {
  handServo.attach(servoPin);
  pinMode(buttonPin, INPUT_PULLUP);
  pinMode(redLED, OUTPUT);
  pinMode(greenLED, OUTPUT);
  Serial.begin(9600);
  handServo.write(ROCK); // start at Rock
  randomSeed(analogRead(A0));
}

void loop() {
  if (digitalRead(buttonPin) == LOW) {
    digitalWrite(redLED, HIGH);

    int move = random(0, 3); // 0, 1, or 2
    int angle = ROCK;
    String moveName = "Rock";

    if (move == 1) {
      angle = PAPER;
      moveName = "Paper";
    } else if (move == 2) {
      angle = SCISSORS;
      moveName = "Scissors";
    }

    handServo.write(angle);
    Serial.println("Robot played: " + moveName);

    delay(600);
    digitalWrite(redLED, LOW);
    digitalWrite(greenLED, HIGH);
    delay(400);
    digitalWrite(greenLED, LOW);

    delay(800); // debounce so one press = one move
  }
}
How it picks a move: random(0, 3) asks the Arduino to roll an invisible 3-sided dice, giving Rock, Paper, or Scissors an equal 1-in-3 chance every single time.

6Playing Your First Game

  1. Power up your Arduino.
  2. Make your own hand gesture — rock, paper, or scissors!
  3. Press the button at the same moment.
  4. Watch the robot hand snap to its move and the green LED flash to confirm.
  5. Compare moves and decide who won — the robot doesn't know the rules, so you get to be the judge!
✊ Rock beats Scissors ✋ Paper beats Rock ✌️ Scissors beats Paper

7Cool Upgrades to Try Next

  • Add a scoreboard: Use an LCD screen to track wins and losses.
  • Add sound: A small buzzer can play a "ready, set, go" countdown before each round.
  • Two robot hands: Build a second hand so the robot can play both sides against itself.
  • Camera detection: Advanced makers can add a camera and basic image recognition to "see" your hand gesture instead of using a judge.
Built something cool? Snap a photo and show your friends and family — you just made a robot that plays games! 🤖✊✋✌️

Comments

Product Cards
Buddy Bot eBook
⭐ New 2026 Release
Build Your
Own Robot!
3D design, wiring &
Arduino coding.
Young inventors love it!
🖨️
3D Print
All parts
Wire it
Circuit guide
💻
Code it
Arduino IDE
🤖
Watch it
Walk & react
📋 Your Details
Enter your name
Valid 10-digit no.
Enter a valid email
Special Website Offer
₹499 300
🌍 International: $5 USD
One-time · Instant digital delivery
🔒 Secured by Razorpay · Your data is safe
📄 Download Free Sample Copy
🔒 Secured by Razorpay · Your data is safe
🍓
Raspberry Pi Pico Mastery
21 Projects
⚡ Launch Price — 80% OFF
Learn Pico
Build 21 Projects!
MicroPython · Wokwi
IoT · Certificate
Perfect for beginners!
🖥️
Wokwi
No hardware
🐍
MicroPy
From zero
🔨
21 Projects
IoT + sensors
📄
Certificate
Verified cert
📋 Your Details
Enter your name
Valid 10-digit no.
Enter a valid email
Special Launch Offer
₹999 200 80% OFF
🌍 International: $5 USD
One-time · Lifetime access · No subscription
🔒 Secured by Razorpay · UPI · Cards · NetBanking
🎉

You're in!

Payment successful! Your Buddy Bot eBook is ready. Time to build!

📖 Access Your eBook Now
🎉

Enrolled!

Payment successful! Lifetime access to all 21 Pico Projects is yours!

🍓 Go to My Course