Hello Everyone!
This is a ESP32 based project. Interfacing of ESP32 with MPU6050 is done in this project using I2C communication protocol. ESP32 reads all the raw values of MPU6050 i.e. acclerometer (in x y and z axis), gyroscope (in x y and z axis) and temperature through I2C bus. The connection of ES32 board and MPU6050 is shown in the block diagram (schematic). Coding is done using visual studio code and compiled using ESP-IDF. Code is uploaded over github, link of which is shared in this project.
The raw values read from MPU6050 by ESP32 are displayed using HTTP protocol. As seen in the video uploaded when we hit api over http we get current values of MPU6050.
To run this project:
1. Open the project configuration menu (idf.py menuconfig
) to configure Wi-Fi or Ethernet.
2. Compile and burn the firmware idf.py -p PORT flash
3. Run idf.py -p PORT monitor
and note down the IP assigned to your ESP module. The default port is 80
4. To test the example : Open browser/postman: GET http://<ip_address>\api\mpu6050\rawvalues
<ip_address> mentioned above is generated when we run idf.py -p PORT monitor
and our ESP32 is connected with an existing network. Same ip address is used and same network is used to hit the api.
Comments