Skip to content

smashembedded/mpu6050-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smash Embedded

MPU6050 IMU

PlatformIO License GitHub stars

A real-time ESP32 IMU dashboard using MPU6050, WebSockets, and Chart.js, built as a PlatformIO project. It uses FreeRTOS under the hood to run sensor data acquisition on a dedicated core task.


Preview

Dashboard

A real-time graph showing accelerometer and gyroscope data in action.


✨ Features

Features

  • FreeRTOS filtered MPU6050 data streaming.
  • Low-pass filter for smoothing noisy sensor data.
  • Dual-line chart visualization: Accel & Gyro.
  • Fast WebSocket communication using ESPAsyncWebServer.
  • Responsive Chart.js interface.
  • Structured as a PlatformIO project.

Hardware Required

  • ESP32
  • MPU6050
  • Micro USB cable
  • WiFi network

Wiring Diagram

Wiring Diagram


Setup

1. Clone the repo

git clone https://github.com/smashembedded/mpu6050-dashboard.git
cd mpu6050

2. Configure WiFi Credentials

Create a file at include/wifi_credentials.h

#pragma once
#define WIFI_SSID     "YourSSID"
#define WIFI_PASSWORD "YourPassword"

3. Upload the Web Interface to SPIFFS

Make sure your dashboard HTML is placed in data/index.html

pio run --target uploadfs

4. Flash the Firmware

pio run --target upload

5. Open Serial Monitor (optional)

pio device monitor

6. Access the Dashboard

After connecting to WiFi, open a browser to:

http://<ESP32_IP>/

Check the serial output for your device's IP address.


How It Works

  • ESP32 reads and filters MPU6050 data at ~40Hz.
  • Accumulated in batches of 10 and sent via WebSocket.
  • Browser receives data as a JSON array and updates two real-time charts.

Dependencies

Check platormio.ini:

  • ArduinoJson
  • ESP Async WebServer
  • AsyncTCP
  • Adafruit MPU6050
  • Adafruit Unified Sensor

PlatformIO

Install the PlatformIO IDE (VS Code extension recommended)


🤝 Contributing

Contributions, bug reports and feature suggestions are welcome!
Feel free to open an issue or submit a pull request.


Support

GitHub Sponsors coming soon!
⭐ this repo or follow me to stay updated.


Contact

[Reach out on Twitter or via email.].


License

Apache License 2.0 © Smash Embedded See the Apache License for full terms.


Credits

About

Real-time MPU6050 sensor dashboard with ESP32, WebSocket & Chart.js (PlatformIO)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors