Maker Pro
Arduino

Play Dinosaur Game using Arduino and Python3

January 27, 2019 by Jalal Mansoori
Share
banner

Beginners should try this project. You can play Dinosaur game not by pressing any keyboard buttons but by motion of your hand :)

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

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

Thats' all

Schematic:

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"

https://create.arduino.cc/projecthub/Jalal_Mansoori/python3-and-arduino-communication-c33192?ref=search&ref_id=python3%20and%20arduino%20communication&offset=0

Last Step is to install 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

Demonstration Video


Author

Avatar
Jalal Mansoori

Learn , Share,  think and repeat Most important Make it SIMPLE !

Related Content

Categories

Comments


You May Also Like