Skip to content

zo-n-ok/dino_automated_by_Arduino

Repository files navigation

๐Ÿฆ– Automated Dino (T-Rex) Game using Arduino ๐ŸŽฎ ๐Ÿ“Œ Description This project automates the popular Google Chrome Dino (T-Rex) game using an Arduino board. It detects obstacles and simulates key presses to help the Dino jump automatically, achieving a high score without manual input. ๐Ÿ”ง Components Needed

๐Ÿ› ๏ธ Arduino Uno (or compatible board) ๐Ÿ”„ Servo motor ๐ŸŒž LDR (Light Dependent Resistor) or IR sensor ๐Ÿ”Œ Jumper wires ๐Ÿ› ๏ธ Breadboard ๐Ÿ”‹ USB cable for Arduino ๐Ÿ’ป Computer with Arduino IDE

โš™๏ธ How It Works

๐Ÿ•ต๏ธโ€โ™‚๏ธ The sensor detects obstacles (e.g., cacti in the Dino game). ๐Ÿ”ง The Arduino processes the input and triggers the servo motor. ๐ŸŽฏ The servo simulates a spacebar press, making the Dino jump.

๐Ÿ› ๏ธ Setup Instructions

๐Ÿ’พ Install Arduino IDE: Download and install from arduino.cc. ๐Ÿ”Œ Connect the Arduino: Plug the Arduino into your computer using a USB cable. โฌ†๏ธ Upload the Code: Open the .ino file in the Arduino IDE and upload it to the board. ๐Ÿ”ง Assemble the Circuit: Connect the sensor and servo motor as per the wiring diagram in the code comments. ๐ŸŽฎ Start the Game: Open Chrome, go to chrome://dino, and let the automation begin!

๐Ÿ“ Code Explanation The code reads sensor values and triggers the servo to "press" the spacebar when an obstacle is detected. It includes a threshold value to differentiate between obstacles and background. ๐ŸŽ›๏ธ Customization

๐Ÿ”ง Adjust Sensor Sensitivity: Tweak the threshold value in the code for different lighting conditions. โณ Change Servo Timing: Modify the servo delay for a faster or slower jump.

๐Ÿ”“ License This project is open-source under the MIT License. Feel free to modify and share!

๐Ÿ Happy high-scoring Dino running! ๐Ÿฆ–โœจ

About

Arduino Uno R3 with Servo and LDR

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages