Trouble with I2C on ESP32C3

OldManArduino
Posts: 2
Joined: Tue Jul 28, 2026 11:21 pm

Trouble with I2C on ESP32C3

Postby OldManArduino » Tue Jul 28, 2026 11:33 pm

Hi.
I have a Waveshare ESP32-C3-LCD-1.47 development board. It includes a QMI8658 IMU. I know the IMU works because the board shipped with a demonstration program (no source code) that showed as much. But my efforts to access the IMU have failed. It seems the simplest I2C operations result in error 4 "other error". Are there some special requirements for doing I2C on an ESP32C3 board? Is there a tutorial on the subject? Thanks.

horace99
Posts: 40
Joined: Mon Oct 14, 2024 10:38 am

Re: Trouble with I2C on ESP32C3

Postby horace99 » Wed Jul 29, 2026 4:16 am


OldManArduino
Posts: 2
Joined: Tue Jul 28, 2026 11:21 pm

Re: Trouble with I2C on ESP32C3

Postby OldManArduino » Thu Jul 30, 2026 12:58 am

Thanks Horace. That is useful information. I've also found this
https://docs.espressif.com/projects/esp ... s/i2c.html
It'll take me a while to absorb it all, but it explains i2c_master.h, and how to create instances of
i2c_master_bus_handle_t That seems to be what I need to learn.

lichurbagan
Posts: 67
Joined: Thu Nov 13, 2025 3:20 pm

Re: Trouble with I2C on ESP32C3

Postby lichurbagan » Tue Aug 25, 2026 5:18 am

There are no special I2C requirements for the ESP32-C3, but this board does not use the default Arduino I2C pins. Initialize the bus explicitly:

Code: Select all

Wire.begin(4, 3);       // SDA = GPIO4, SCL = GPIO3
Wire.setClock(100000);
An I2C scan should detect 0x24, 0x6B, and 0x7E; the QMI8658 should appear at 0x6B. Error 4 commonly means the wrong pins are being used or another library has reinitialized `Wire`.

You can use this I2C communication tutorial as a reference for bus addressing and scanning. Waveshare’s official example repository also contains the QMI8658 driver and initialization sequence.

Who is online

Users browsing this forum: Qwantbot and 1 guest