Introduction: Play Dinosaur Game Using Arduino and Python3

About: Learn, Share , think, try Make it Simple :)

Project Description

Most of us have played dinosaur game by google when our internet was not working and if you have not played this game don't worry now can but not in a conventional way pressing buttons but by using motion of your hand. So in this project using hand motion photo resistor sends values to arduino and arduino sends it to python3 and by using famous library of python pyautogui we can perform "up" arrow function :)

How i decided to make this project ?

Recently I watched a video on youtube regarding project which was about Arduino based Hand Gesture Control of Computer and I really wanted to make that project but currently I don't have ultrasonic sensors which was required to make that project. So I read all the stuff how that project works ? and then I thought I can also do that kind of work by using photo resistor (LDR) sensor. And then I decided let's control "up arrow" key and use it in dinosaur game. Most importantly beginners can also try this project which can increase their interest level.

Below is a video I watched recently

Step 1: Components

Now let's start to make it:

Things required to make this project:

  • One Arduno UNO board
  • Breadboard
  • Photo Resistor also known as LDR
  • 10k ohm resistor
  • Jumper wires

Step 2: Circuit Diagram

Information Regarding Python3:

Now to make this project you need to install python3 on your system for that I recently uploaded a project "Python3 and Arduino Communication" and there I have uploaded stuff regarding how to install python3. If you want to get familiar with python3 and arduino I recommend you to check that project :)
Below is a link of "Python3 and Arduino Communication"

Step 3: How to Install Python Library Pyautogui

Now you need to install python library pyautogui which will perform "up arrow" function.

After you have succesfully install python3 on your system:

Follow these steps:

  • open command prompt by clicking run as administrator and write

cd C:\Python37

  • Now you need to write below command

python -m pip install --upgrade pip

  • Now this is last command you need to write

pip install pyautogui

Step 4: Code for Arduino and Python3

Step 5: Demonstration Video

Thank you Makers :)

Enjoy , learn , create, share :)

Thank you to my teachers



open source community

webpages from internet