DIY Rock Paper Scissor Game

 

Do you play Games?

 

A game is any activity which is executed only for pleasure and without conscious purpose. In this definition every activity that brings pleasure is a game. For example, people dance, play musical instruments, act in plays, and play with dolls and model trains.


What criteria must a game have?

 
  • Game rules
  • Goal
  • The course of the game is never the same - chance
  • Competition

Playing means being active

Whoever reads a book, watches a movie, or listens to music, consumes or acquires, but does not act. While nowadays most leisure activities seduce people into passivity, the game makes people act. Depending on the game, the following activities may be undertaken:

Spiritual Area

  • thinking, combining
  • planning
  • making decisions
  • concentrating
  • training your mind
  • receiving knowledge
  • understand the impact of systems

Emotional Area

  • rules, accepting laws
  • to learn how to work with others
  • to learn how to lose
  • to learn more about yourself and others
  • to use fantasy and creativity

Motor Area

  • practice skillfulness
  • practice reactions

I am sure that games do not fulfill a purpose, but are not useless. Activity is basic to all games. Here again, the embracing game term has its value.

 

Rock Paper Scissor Game using Ultrasonic Sensor

I made a DIY Rock Paper Scissor Game.

This Game is made up of Ultrasonic sensor with Servo Motors.

When you placed you hand in-front of Ultrasonic sensor, rock, scissor or paper is up according to the code.

 

 


 

What is Ultrasonic Sensor?

An ultrasonic sensor is an electronic device that measures the distance of a target object by emitting ultrasonic sound waves, and converts the reflected sound into an electrical signal. Ultrasonic waves travel faster than the speed of audible sound (i.e. the sound that humans can hear).


You can make this game and enjoy it...

You can play this game with your friends also.




 

Give me suggestions so I can improve my project.

    

https://studio.youtube.com/channel/UCaXI2PcsTlH5g0et67kdD6g


If you want to buy Components Just visit the below Amazon Affiliate Links:

Parts List:-

1. Arduino Nano : https://amzn.to/3xQpPqD
 
2. Servo Motors x 3 : https://amzn.to/3xTdTEq
 
3. Ultrasonic Sensor : https://amzn.to/35Opd8W
 
4. LCD 16 x 2 : https://amzn.to/3wXRjKO
 
 
6. Resistor Pack : https://amzn.to/3A0tUu7
 
7. Jumper Wires : https://amzn.to/3vUTM7I
 


Circuit Diagram of this Project

 

 


 
Copy the Arduino Code from below and paste it in Arduino IDE

 

 

// https://www.youtube.com/channel/UCaXI2PcsTlH5g0et67kdD6g  //

// Stone Paper Scissor Game //

// By MOHD SOHAIL //


#include<LiquidCrystal.h>

#include <Servo.h>


LiquidCrystal lcd(A0,A1,A2,A3,A4,A5);

volatile long A;


float checkdistance_11_10() 

{

digitalWrite(11, LOW);

delayMicroseconds(2);

digitalWrite(11, HIGH);

delayMicroseconds(10);

digitalWrite(11, LOW);

float distance = pulseIn(10, HIGH) / 58.00;

delay(10);

return distance;

}


Servo servo_3;

Servo servo_6;

Servo servo_9;


int red1 = 2;

int red2 = 4;

int red3 = 5;

int speaker = 12;


void setup()

{

 lcd.begin(16,2);

 lcd.setCursor(0,0);

 lcd.print(" Rock Paper and ");

 lcd.setCursor(0,1);

 lcd.print(" Scissor Game ");

 delay(4000);

 lcd.clear();

 

A = 0;

pinMode(11, OUTPUT);

pinMode(10, INPUT);

pinMode(12, OUTPUT);

pinMode(red1, OUTPUT);

pinMode(red2, OUTPUT);

pinMode(red3, OUTPUT);

servo_3.attach(3);    // stone

servo_6.attach(6);    // paper

servo_9.attach(9);     // scissor

servo_3.write(179);

servo_6.write(179);

servo_9.write(179);

}


void loop()

{

if (checkdistance_11_10() < 10) {

A = random(0, 4);

switch (A) {

case 1:

tone(12,131);

delay(100);

noTone(12);

servo_3.write(120);

 lcd.setCursor(0,0);

 lcd.print(" It's....");

 lcd.setCursor(0,1);

 lcd.print("      Stone....");

 digitalWrite(red1, HIGH);

delay(1000);

servo_3.write(179);

digitalWrite(red1, LOW);

lcd.clear();

delay(500);

break;

case 2:

tone(12,131);

delay(100);

noTone(12);

servo_6.write(120);

lcd.setCursor(0,0);

 lcd.print(" It's....");

 lcd.setCursor(0,1);

 lcd.print("      Paper....");

 digitalWrite(red2, HIGH);

delay(1000);

servo_6.write(179);

digitalWrite(red2, LOW);

lcd.clear();

delay(500);

break;

case 3:

tone(12,131);

delay(100);

noTone(12);

servo_9.write(120);

lcd.setCursor(0,0);

 lcd.print(" It's....");

 lcd.setCursor(0,1);

 lcd.print("     Scissor....");

 digitalWrite(red3, HIGH);

delay(1000);

servo_9.write(179);

digitalWrite(red3, LOW);

lcd.clear();

delay(500);

break;

}

}

}

 

If you have any query regarding this project, Contact me from below :

Telegram +919557024177
Instagram id : eif.08
Facebook page  : EIF08

 

Post a Comment

0 Comments