Real-life Dino Jump: Bringing The Chrome Dino Game To Life!

About the project

Ever wondered what it would be like to control the Chrome Dino game with your own movements?

Project info

Difficulty: Easy

Platforms: DFRobotEspressif

Estimated time: 1 hour

License: GNU General Public License, version 3 or later (GPL3+)

Items used in this project

Hardware components

custom Esp32(optional) custom Esp32(optional) x 1
DFRobot 6 DOF Sensor - MPU6050 DFRobot 6 DOF Sensor - MPU6050 x 1
Espressif ESP32 Espressif ESP32 x 1

Software apps and online services

Arduino IDE Arduino IDE

Story

Have you ever played the Chrome Dino game and wished you could control the Dino with your own movements? Well, that's exactly what I've done in this project! By using an ESP32 microcontroller and an MPU6050 accelerometer, I've created a setup where jumping in real life makes the Dino jump in the game. Let's dive into the details of how you can recreate this fun and interactive experience.

1 / 2

Setting Up the ESP32 and MPU6050

I have made a breakout board for the esp32 which has a dedicated spot for the mpu6050 for easy connection. Check this out

OR

Wiring the Components:

  • Connect the VCC of the MPU6050 to the 3.3V pin on the ESP32.
  • Connect the GND of the MPU6050 to the GND pin on the ESP32.
  • Connect the SCL of the MPU6050 to the SCL pin on the ESP32.
  • Connect the SDA of the MPU6050 to the SDA pin on the ESP32.

1 / 2

Installing the Required Libraries:

1 / 3

1 / 2

Coding the ESP32:

  • The ESP32 will use BLE to act as a keyboard. When the MPU6050 detects a jump, it will send a spacebar keypress to make the Dino jump.

remember to calibrate the jump detection. You can always use your serial monitor for help

Testing the Setup
  • Upload the Code: Connect your ESP32 to your computer and upload the code using the Arduino IDE.
  • Pair with Your Computer: Once the code is uploaded, pair the ESP32 with your computer via Bluetooth. It should show up as a keyboard.

  • Open the Chrome Dino Game: Open Chrome and navigate to the Dino game by typing chrome://dino in the address bar.

  • Jump and Play: Start the game and jump in real life. The MPU6050 will detect your jump and send a spacebar keypress to the game, making the Dino jump.

Wrap-Up and Future Ideas

This project is a fun way to blend physical activity with classic gaming. Not only does it make the Chrome Dino game more interactive, but it also introduces you to the basics of working with sensors and BLE communication using the ESP32.

For future improvements, you could:

  • Fine-tune the Jump Detection: Adjust the accelerometer threshold for more accurate jump detection.
  • Add More Movements: Incorporate additional gestures to control other aspects of the game, like ducking.

Code

Code_for_dino

Credits

Leave your feedback...