https://github.com/smashembedded/mpu6050-dashboard
Real-time MPU6050 sensor dashboard with ESP32, WebSocket & Chart.js (PlatformIO)
https://github.com/smashembedded/mpu6050-dashboard
arduino chartjs dashboard esp32 freertos fun html5 iot javascript mpu6050 platformio real-time sensor spiffs websocket
Last synced: 7 months ago
JSON representation
Real-time MPU6050 sensor dashboard with ESP32, WebSocket & Chart.js (PlatformIO)
- Host: GitHub
- URL: https://github.com/smashembedded/mpu6050-dashboard
- Owner: smashembedded
- License: other
- Created: 2025-04-04T18:44:10.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-04-12T18:40:07.000Z (11 months ago)
- Last Synced: 2025-04-12T19:34:54.381Z (11 months ago)
- Topics: arduino, chartjs, dashboard, esp32, freertos, fun, html5, iot, javascript, mpu6050, platformio, real-time, sensor, spiffs, websocket
- Language: HTML
- Homepage:
- Size: 293 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# MPU6050 IMU

[](./LICENSE)

A real-time ESP32 IMU dashboard using **MPU6050**, **WebSockets**, and **Chart.js**, built as a [PlatformIO](https://platformio.org/) project. It uses **FreeRTOS** under the hood to run sensor data acquisition on a dedicated core task.
---
## Preview

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

---
## Setup
### 1. Clone the repo
```bash
git clone https://github.com/smashembedded/mpu6050-dashboard.git
cd mpu6050
```
### 2. Configure WiFi Credentials
Create a file at `include/wifi_credentials.h`
```bash
#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`
```bash
pio run --target uploadfs
```
### 4. Flash the Firmware
```bash
pio run --target upload
```
### 5. Open Serial Monitor (optional)
```bash
pio device monitor
```
### 6. Access the Dashboard
After connecting to WiFi, open a browser to:
```bash
http:///
```
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](https://platformio.org/install) (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](https://github.com/tu-usuario) to stay updated.
---
## Contact
[Reach out on [Twitter](https://twitter.com/tu_handle) or via [email](mailto:you@example.com).].
---
## License
[Apache License 2.0](LICENSE) © Smash Embedded
See the [Apache License](https://www.apache.org/licenses/LICENSE-2.0) for full terms.
---
## Credits
* [Chart.js](https://www.chartjs.org/) for interactive charting.
* [ESPAsyncWebServer](https://github.com/me-no-dev/ESPAsyncWebServer).
* [Adafruit MPU6050 Library](https://github.com/adafruit/Adafruit_MPU6050).
* [Vanepp](https://forum.fritzing.org/u/vanepp/summary) for providing the ESP32 Fritzing model on the [forum](https://forum.fritzing.org/t/esp-32-de-30-pines/22637).