Skip to content

semiloker/MPU6050_TFT_3D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MPU6050_TFT_3D

A project to display and rotate 3D objects on a TFT screen using data from the MPU6050 gyroscope and accelerometer.


📜 Overview

MPU6050_TFT_3D is an interactive 3D visualization project. It uses the MPU6050 module to detect motion and displays a rotating 3D cube on an Adafruit TFT display. This is a great learning tool for working with accelerometers, gyroscopes, and graphical displays with Arduino or PlatformIO.

✨ Features

  • Real-time 3D cube rendering on a TFT screen.
  • Dynamic rotation based on MPU6050 sensor data.
  • Displays real-time acceleration, gyroscope, and temperature readings.
  • Optimized drawing to reduce flickering.

🛠️ Components Required

  • Microcontroller: Arduino, ESP32, or compatible board.
  • Display: Adafruit ST7735 or compatible TFT screen.
  • MPU6050: Gyroscope and accelerometer module.

🚀 Getting Started

1. Clone the Repository

git clone https://github.com/your-username/MPU6050_TFT_3D.git

2. Open the Project

Open the downloaded folder in PlatformIO (recommended) or Arduino IDE.

3. Connect Hardware

Follow the pin connections below to set up the hardware:

  • MPU6050 to Microcontroller:
    • VCC → 5V (Arduino Nano)
    • GND → GND (Arduino Nano)
    • SCL → A5 (Arduino Nano)
    • SDA → A4 (Arduino Nano)
  • TFT Display to Microcontroller:
    • VCC (ST7735S) → 5V (Arduino Nano)
    • GND (ST7735S) → GND (Arduino Nano)
    • CS (ST7735S) → D10 (Arduino Nano)
    • RST (ST7735S) → D8 (Arduino Nano)
    • A0(DC) (ST7735S) → D9 (Arduino Nano)
    • SDA (ST7735S) → D11 (Arduino Nano)
    • SCK (ST7735S) → D13 (Arduino Nano)
    • LED (ST7735S) → 3V (Arduino Nano)

4. Install Required Libraries

Ensure the following libraries are installed in your PlatformIO or Arduino IDE:

  • Adafruit GFX Library
  • Adafruit ST7735 and ST7789 Library
  • Adafruit MPU6050 Library
  • Adafruit Sensor Library

5. Upload the Code

Compile and upload the code to your microcontroller using PlatformIO or Arduino IDE.

6. View the Results

Once uploaded, the TFT screen will display a rotating 3D cube, along with real-time sensor data such as acceleration, gyroscope readings, and temperature.


📂 Project Structure

  • src/: Contains the main source code.
  • platformio.ini: PlatformIO project configuration file.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages