๐ฆ 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! ๐ฆโจ