Skip to content

"ESP32 interface with MPU6050 sensor using I2C protocol. This project reads accelerometer and gyroscope data from the MPU6050 and logs it using the ESP-IDF framework."

Notifications You must be signed in to change notification settings

Saeed-dev2/MPU6050_SENSOR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MPU6050 Sensor

This project demonstrates how to interface the MPU6050 sensor with an ESP32 microcontroller using the I2C protocol. The Code initializes the MPU6050, reads data from its Accelerometer and Gyroscope, and logs the results using the ESP-IDF Framework.

Table of Contents

Introduction

The MPU6050 is a popular sensor that combines a 3-axis accelerometer and a 3-axis gyroscope. This project illustrates how to set up the MPU6050 with an ESP32 microcontroller to read the sensor data and log it using the ESP-IDF Framework.

Features

  • I2C communication with MPU6050 sensor.
  • Initialization and configuration of the MPU6050.
  • Reading accelerometer and gyroscope data.
  • Logging sensor data to the console.

Hardware Required

  • ESP32 Development Board
  • MPU6050 Sensor Module
  • Jumper Wires
  • Breadboard

Software Required

Wiring Diagram

Here is the wiring configuration:

MPU6050 Pin ESP32 Pin
VCC 3.3V
GND GND
SCL GPIO 22
SDA GPIO 21

Installation and Setup

1. Clone the Repository

git clone https://github.com/Saeed-dev2/MPU6050_SENSOR.git
cd mpu6050-esp32

2. Build and Flash the Project

idf.py set-target esp32
idf.py build
idf.py flash
idf.py monitor

Usage

After flashing the firmware, the ESP32 will start reading data from the MPU6050 sensor and log the accelerometer and gyroscope values to the console every second.

The output will look like this:

I (1234) MPU6050: Accel: (123, 456, 789), Gyro: (-123, -456, -789)

About

"ESP32 interface with MPU6050 sensor using I2C protocol. This project reads accelerometer and gyroscope data from the MPU6050 and logs it using the ESP-IDF framework."

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published