Comments on: ESP32 Web Server with MPU-6050 Accelerometer and Gyroscope (3D object representation) https://randomnerdtutorials.com/esp32-mpu-6050-web-server/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Thu, 26 Mar 2026 12:23:56 +0000 hourly 1 https://wordpress.org/?v=6.8.5 By: Sara Santos https://randomnerdtutorials.com/esp32-mpu-6050-web-server/#comment-1172947 Thu, 26 Mar 2026 12:23:56 +0000 https://randomnerdtutorials.com/?p=101046#comment-1172947 In reply to Vahe.

Hi.
Check this section of this tutorial that explains how to set different I2C pins: https://randomnerdtutorials.com/esp32-i2c-communication-arduino-ide/#3

Define your pins. For example:
#define I2C_SDA 33
#define I2C_SCL 32

Create a TwoWire instance:
TwoWire MYI2C= TwoWire(0);

Initialize the sensor using that new instance:
if (!mpu.begin(MPU6050_I2CADDR_DEFAULT, &MYI2C, 0)) {

As shown in this line of the library file:
bool begin(uint8_t i2c_addr = MPU6050_I2CADDR_DEFAULT, TwoWire *wire = &Wire,
int32_t sensorID = 0)
github.com/adafruit/Adafruit_MPU6050/blob/master/Adafruit_MPU6050.h

I hope this helps.
Regards,
Sara

]]>
By: Vahe https://randomnerdtutorials.com/esp32-mpu-6050-web-server/#comment-1171953 Tue, 24 Mar 2026 12:55:20 +0000 https://randomnerdtutorials.com/?p=101046#comment-1171953 Thanks for tutorial. I use ESP32C6 based module, which default I2C pins are different then has classic ESP32 boards. Where the SDA&SCL pins can be declared directly?

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-mpu-6050-web-server/#comment-1128025 Thu, 27 Nov 2025 21:46:56 +0000 https://randomnerdtutorials.com/?p=101046#comment-1128025 In reply to Anakin.

Thank you.
Regards,
Sara

]]>
By: Anakin https://randomnerdtutorials.com/esp32-mpu-6050-web-server/#comment-1127988 Thu, 27 Nov 2025 16:50:25 +0000 https://randomnerdtutorials.com/?p=101046#comment-1127988 Beautiful project, it works flawlessly.
Thanks for sharing your knowledge with the world.
Sincerely,
Anakin

]]>
By: Daniel https://randomnerdtutorials.com/esp32-mpu-6050-web-server/#comment-1127161 Mon, 24 Nov 2025 15:47:19 +0000 https://randomnerdtutorials.com/?p=101046#comment-1127161 In reply to Sara Santos.

Hi,

Thanks for the quick response. Unfortunately, that didn’t work either. But when I adjust your code as follows, it works.

// Init MPU6050
void initMPU(){
if (!mpu.begin()) {
Serial.println(“Failed to find MPU6050 chip”);
// while (1) {
// delay(10);
// }
}
Serial.println(“MPU6050 Found!”);
}
Regards,
Daniel

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-mpu-6050-web-server/#comment-1127109 Mon, 24 Nov 2025 10:18:24 +0000 https://randomnerdtutorials.com/?p=101046#comment-1127109 In reply to Daniel.

Hi.
You can pass the I2C address of the sensor to this line:
if (!mpu.begin(YOUR_I2C_ADDRESS)) {

Regards,
Sara

]]>
By: Daniel https://randomnerdtutorials.com/esp32-mpu-6050-web-server/#comment-1127053 Mon, 24 Nov 2025 05:06:44 +0000 https://randomnerdtutorials.com/?p=101046#comment-1127053 Hi,
Really nice project and very well described, especially for beginners like me. Thank you very much for that.

Unfortunately, I can’t get it to work with an ESP32 mini D1. It just can’t find the MPU6050. Further up in the comments section, I tested the I2C scanner sketch and it returned the following: I2C device found at address 0x68

So it does find the MPU6050.

If I use the original, I only get the following output:

192.168.3.225
LittleFS mounted successfully
Failed to find MPU6050 chip

Is it possible to specify the MPU address and the pins used in the script?

Best regards
Daniel

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-mpu-6050-web-server/#comment-1076323 Wed, 30 Jul 2025 15:53:08 +0000 https://randomnerdtutorials.com/?p=101046#comment-1076323 In reply to Jessica.

How are you uploading the files to LittleFS?

]]>
By: Jessica https://randomnerdtutorials.com/esp32-mpu-6050-web-server/#comment-1076137 Wed, 30 Jul 2025 01:34:58 +0000 https://randomnerdtutorials.com/?p=101046#comment-1076137 In reply to Jessica.

hey! So i got it fixing if anyone has the same problem uh its just scyning and takes time thank you Sara Santos for the libraries help good day

]]>
By: Jessica https://randomnerdtutorials.com/esp32-mpu-6050-web-server/#comment-1075685 Mon, 28 Jul 2025 17:21:22 +0000 https://randomnerdtutorials.com/?p=101046#comment-1075685 In reply to Sara Santos.

Oops, yah your right. I messed up.
I have another question idk if you could answer or not.

So basically, I wanted to tweak the website, but whenever I do, littleFS no longer works and I get an error message. Is there a reason for this? I use VS Code to edit the HTML files. Do I need to use PlatformIO for that then?

]]>