This is a web based dashboard for graphical representation of real-time acceleration and rotation data from MPU6050 using websockets. It also records and stores time series sensor data using InfluxDB. Done as a part of 19CSE446 Internet of Things Course
, Department of Computer Science and Engineering, Amrita Vishwa Vidyapeetham, Coimbatore.
-
Arduino ESP32
-
Adafruit
-
Embedded C
-
WebSockets
-
InfluxDB
-
NodeJS
-
React
-
NextJS
-
Express
-
MUI React
Note
This video doesn't contain any audio ๐
Demo.mp4
- Either clone the repository (or) download the Source Code from the latest release.
- Connect the MPU6050 Sensor to the
ESP32 Microcontroller
and connect the Microcontroller to your computer through a USB Cable.
- Install all the necessary libraries in Arduino IDE
- Enter the Wifi Network SSID, PASSWORD, IP Address of the Server Computer in which your Backend is Running in The
mpu6050.ino
Arduino File and Upload the code to the board.
Important
It is necessary that both the ESP32 Microcontroller
and the backend server are connected to the same WiFi Network for the Code to work.
- Install
InfluxDB
on your Server Computer (OR) you can use the cloud version also instead. - Create a user, organisation of your choice and a Bucket named
IOT
. - Create an API Access Token with Read and Write Permissions to IOT bucket.
- In the Server Computer, make sure you have
nodeJS
installed. - Goto the backend folder and type the following commands to install the dependencies.
> npm install
- Goto the .env file to enter your Environmental Variables, i.e,
INFLUXDB API TOKEN
,INFLUXDB URL
andINFLUXDB ORGANISATION
.
- To run the development server type the following command
> npm run dev
- You can test the websockets server by using the
./TestWebsockets/test.html
document.
Note
Enable Audio ๐ for Audio Explanation.
Explanatory_Demonstration.mp4
Refer to The Code of Conduct before making a pull request to the repository, posting on the discussions section or involing in any public activity related to this repository.
All code in this repository is Licensed Under MIT License
, and is freely available for anyone to use or make changes.
Refer SECURITY.md for Security Policy.