Saturday, April 4, 2020

Google Chrome Automatic Dinosaur Game Player

Introduction

      I this blog we will see how to design  'Google Chrome Automatic dinosaur Game Player' as shown in the following video:



Components required:

                  
                               1)  Arduino
                               2)  Servo Motor
                               3)  LDR 
                               4)  Resistor 10kΩ
  

Circuit Diagram:

ckt1: Circuit Diagram

 

Servo Motor position on SPACE button  

                   Stick servo motor near SPACE button using bouble side tape       

           
image1: servo motor fixed near SPACE using Double side tape
  

Arduino CODE:



 

Setting Variables in CODE

 

   There are 3 variable you need calculate in arduino code . That are threshold, unpressed angle and pressed angle

 

 Calculating 'threshold' :
                 upload 'AnalogReadSerial' program given in  
File->Example->Basics->AnalogReadSerial

          Start the game in Google Chrome and take a screenshot as shown below

 
image 2: a screenshot of game

                 1)  Attach LDR and resistor as shown in circuit diagram.
                 2)  Touch LDR face to while the background of game and note the reading
                           ( I got reading 410 )
                 3)  put threshold equal to 5 less than noted reading  ( I put 410-5 = 405 in above program)

Calculating 'pressed_angle' :    
               
                              Attach servo motor as shown in above image1 and then decrement 'pressed_angle' and stop at the point when button is pressed then that will be value of 'pressed_angle' (I put it 36 in above program)

Calculating 'unpressed_angle' :
             
                             put           unpressed_angle = pressed_angle+34

                             (I put   unpressed_angle = 70 in above program)



Now stick LDR on the screen above 't' in 'No Internet' text using cello tape as shown in above Youtube video and enjoy!!!!!

Google Chrome Automatic Dinosaur Game Player

Introduction       I this blog we will see how to design  'Google Chrome Automatic dinosaur Game Player' as shown in the followi...