Automated Dino Game using Arduino

Automated Dino Game using Arduino:

So hey guy's welcome back to a new article in this article we will make a google dinosaur game using Arduino this Automated Dino Game is very easy to make In few steps you can make this dino game at home when I was watching Tik-Tok a few days ago, I got this idea from Tik-Tok And I liked this idea so much so why not think I will share it with you.

and to make this automated dino game I am using Arduino UNO you can also use Arduino nano So in this article, we will Dino Game and you will know something about it. so without wasting any time let's see Dino Game using Arduino

Automated Dino Game using Arduino



Needed Components:
  1. Arduino Uno:
  2. Servo Motor:
  3. 10K Resistor:
  4. LDR:
Introduction:

Today in this article we are going to make an automated Dino game using Arduino Uno as I said. when I was watching Tik Tok a few days ago I got this idea from Tik-Tok and I like this idea so much so why not think I will share it with you and by the way, If you have not followed me on Tiktok then please go ahead and follow me on Tik-Tok So let's come to our topic.

And I know you get bored in lockdown, then you can build this project for fun to make this project, we need Arduino Uno; Servo Motor; 10K Resistor, and most Important thing LDR (Light Dependent Resistor) LDR is to automatically turn on a light at a certain light level. An example of this could be a street light or a garden light.

But in this project, we put the LDR on the screen of the laptop not on the road. 😂

Automated Dino Game using Arduino

When dark comes on LDR then LDR gets the signal to Arduino Analog Pin (A0) then Arduino gives a single to digital pin 9 to activate the Servo Motor.

As you know, we connected our servo motor to the laptop to press the space button.

Automated Dino Game using Arduino


And just that this is the circuit of us. Similarly, it keeps on working again and again. So how easy was it to make it? Do share this project with your relatives and friends who have a PC laptop or desktop.
And if you have any doubts related to this project, then you can comment and ask me.

Watch YouTube Video:
And if you have any questions, then watch the video before commenting and if your question does not go away, then you can comment to me and ask.


Circuit Schematics:
I have Made the circuit diagram on offline software in fritzing
Automated Dino Game using Arduino

Code:



So that is for this project if you like my article then you can also read [Another article] on our website.

5 Comments

  1. The problem is with terodactil :(

    ReplyDelete
  2. #include
    #define threshold 250
    #define unpress_angle 70
    #define press_angle 36


    Servo myservo; // create servo object to control a servo
    bool trig=true;

    void setup() {
    myservo.attach(9); // attaches the servo on pin 9 to the servo object
    myservo.write(unpress_angle);
    }

    void loop() {

    myservo.write(unpress_angle); // unpress the button
    delay(1);
    if(analogRead(A0)< threshold)
    {

    myservo.write(press_angle); // press the button
    delay(100 ); // waits 100ms for the servo to reach the position

    }
    }

    ReplyDelete
  3. Hi, u have a code for the LDR also - but y it is seperate & where to use it?

    ReplyDelete

Post a Comment