# I2C not correctly working between two ESP32-C3

**URL:** <https://forum.arduino.cc/t/i2c-not-correctly-working-between-two-esp32-c3/1437056>\
**Category:** 3rd Party Boards\
**Created:** [March 25, 2026, 4:41pm UTC](https://forum.arduino.cc/t/i2c-not-correctly-working-between-two-esp32-c3/1437056 "2026-03-25T16:41:59Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinomakon](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/vinomakon/32/1265337_2.png) [@vinomakon](https://forum.arduino.cc/u/vinomakon)\
**Post date:** [March 25, 2026, 4:41pm UTC](https://forum.arduino.cc/t/i2c-not-correctly-working-between-two-esp32-c3/1437056/1 "2026-03-25T16:41:59Z")

</div>

I have two ESP32-C3 Super Mini, that are connected to their respective pins for I2C, which is Pin 8 for SDA and Pin 9 for SCL. There is a pullup resistor of 4.7K Ohms on each respective line. Both of the 5V and GND of both of the MCUs are connected.  
On the Master's side I have a simple script to search for I2C-devices:

```arduino
byte error, address;
byte n_devices = 0;
uint8_t devices[127];
for (int i = 0; i < 127; i++) {
    available_devices[i] = false;
}
for (address=1; address<=127; address++) {
    Wire.beginTransmission(address);
    error = Wire.endTransmission();
    if (error == 0){
        devices[n_devices] = address;
        available_devices[address-1] = true;
        n_devices++;
    }
}
if (n_devices > 0){
    ws.textAll("THERE ARE DEVICES CONNECTED");
} else {
    ws.textAll("Haven't discovered any devices...");
}

```

(I am also running a websocket-server asynchronously)  
Now, when I connect the slave ESP32 with the following setup()-code

```arduino
#define I2C_SLV_ADDR 0x55

void setup() {
  Wire.begin(I2C_SLV_ADDR);
  Wire.onReceive(onReceive);
  Wire.onRequest(onRequest);
}

```

the master doesn't recognize the ESP32. But as soon as I connect a device that supports I2C (servo controller) it recognizes the servo-controller without problems.  
Where could the problem lay in?

---

<div class="post-metadata">

**Author:** ![van\_der\_decken](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/van_der_decken/32/1006976_2.png) [@van\_der\_decken](https://forum.arduino.cc/u/van_der_decken)\
**Post date:** [March 25, 2026, 4:54pm UTC](https://forum.arduino.cc/t/i2c-not-correctly-working-between-two-esp32-c3/1437056/2 "2026-03-25T16:54:00Z")

</div>

What voltage are your pullup resistors connected to? If 3.3V, 4.7K is probably too high a value.

---

<div class="post-metadata">

**Author:** ![vinomakon](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/vinomakon/32/1265337_2.png) [@vinomakon](https://forum.arduino.cc/u/vinomakon)\
**Post date:** [March 25, 2026, 4:59pm UTC](https://forum.arduino.cc/t/i2c-not-correctly-working-between-two-esp32-c3/1437056/3 "2026-03-25T16:59:08Z")

</div>

I put them at the 3.3V line. Though, as mentioned, it did work with the servo-controller. Should it be a different resistor-value? (I tried 10k as well, no luck)

---

<div class="post-metadata">

**Author:** ![van\_der\_decken](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/van_der_decken/32/1006976_2.png) [@van\_der\_decken](https://forum.arduino.cc/u/van_der_decken)\
**Post date:** [March 25, 2026, 5:07pm UTC](https://forum.arduino.cc/t/i2c-not-correctly-working-between-two-esp32-c3/1437056/4 "2026-03-25T17:07:32Z")

</div>

For 3.3V, I would try 3.3K. And I'm glad to hear that you didn't pull up to 5V.

---

<div class="post-metadata">

**Author:** ![vinomakon](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/vinomakon/32/1265337_2.png) [@vinomakon](https://forum.arduino.cc/u/vinomakon)\
**Post date:** [March 25, 2026, 5:37pm UTC](https://forum.arduino.cc/t/i2c-not-correctly-working-between-two-esp32-c3/1437056/5 "2026-03-25T17:37:16Z")

</div>

No, sadly it still didn't work.  
I think it's best to send a picture of the setup

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/3/1/7/3178b5ccdde2b43d54b06706772172520d2d352e.jpeg)

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [March 25, 2026, 5:55pm UTC](https://forum.arduino.cc/t/i2c-not-correctly-working-between-two-esp32-c3/1437056/6 "2026-03-25T17:55:10Z")

</div>

> [@vinomakon](#):
>
> didn't work.

3k3 or 4k7?

> **[I2C - SparkFun Learn](https://learn.sparkfun.com/tutorials/i2c/i2c-at-the-hardware-level)**

---

<div class="post-metadata">

**Author:** ![vinomakon](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/vinomakon/32/1265337_2.png) [@vinomakon](https://forum.arduino.cc/u/vinomakon)\
**Post date:** [March 25, 2026, 5:55pm UTC](https://forum.arduino.cc/t/i2c-not-correctly-working-between-two-esp32-c3/1437056/7 "2026-03-25T17:55:42Z")

</div>

both didn't work  
but as mentioned before, using 4k7 on a [servo-controller](https://de.aliexpress.com/item/1005009595510490.html) did work

---

<div class="post-metadata">

**Author:** ![GolamMostafa](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/golammostafa/32/239011_2.png) [@GolamMostafa](https://forum.arduino.cc/u/GolamMostafa)\
**Post date:** [March 25, 2026, 6:01pm UTC](https://forum.arduino.cc/t/i2c-not-correctly-working-between-two-esp32-c3/1437056/8 "2026-03-25T18:01:33Z")

</div>

First figur-out the correct header pins for SDA/SCL signals:

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/c/5/1/c51c43157043ebfc322925e39093fd34f1db2023.png)

---

<div class="post-metadata">

**Author:** ![vinomakon](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/vinomakon/32/1265337_2.png) [@vinomakon](https://forum.arduino.cc/u/vinomakon)\
**Post date:** [March 25, 2026, 6:19pm UTC](https://forum.arduino.cc/t/i2c-not-correctly-working-between-two-esp32-c3/1437056/9 "2026-03-25T18:19:39Z")

</div>

I have tested initiating I2C over GPIO 4 _SDI_ and 5 _SCL_, but to no avail, instead it led to worse results, making the MCU unresponsive (I am not getting any response per websocket). But in theory, shouldn't any pin-setup for the I2C work?  
I am currently just applying:

```arduino
#define I2C_SDA 4 // 8 prior
#define I2C_SCL 5 // 9 prior
...
  Wire.begin(I2C_SDA, I2C_SCL);

```

on the slave

```arduino
#define I2C_SLV_ADDR 0x55

#define I2C_SDA 4 // 8 prior
#define I2C_SCL 5 // 9 prior
...
  Wire.begin(I2C_SDA, I2C_SCL, I2C_SLV_ADDR);

```

I sadly don't have an oscillograph, so I cannot analyze the proper signal transmission.

_ **Small update edit** _  
I looked up the declaration of the begin()-method.

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/a/6/3/a63fe279aed9441f1317172a2b16beb792b0cad6.png)  
I haven't tried it properly, but I assume that I should change the slave-setup() to

```arduino
Wire.begin(I2C_SLV_ADDR, I2C_SDA, I2C_SCL, 1e5);

```

I'll check up on it, as soon as I get my hands on it.

---

<div class="post-metadata">

**Author:** ![Brazilino](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/brazilino/32/1198404_2.png) [@Brazilino](https://forum.arduino.cc/u/Brazilino)\
**Post date:** [March 25, 2026, 8:02pm UTC](https://forum.arduino.cc/t/i2c-not-correctly-working-between-two-esp32-c3/1437056/10 "2026-03-25T20:02:09Z")

</div>

Hi! Welcome to the Forum.

If you don’t mind me asking: why do you need I2C to connect these two boards if you can exchange data between them wirelessly (e.g. ESP-NOW)?

---

<div class="post-metadata">

**Author:** ![vinomakon](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/vinomakon/32/1265337_2.png) [@vinomakon](https://forum.arduino.cc/u/vinomakon)\
**Post date:** [March 25, 2026, 8:28pm UTC](https://forum.arduino.cc/t/i2c-not-correctly-working-between-two-esp32-c3/1437056/11 "2026-03-25T20:28:47Z")

</div>

I I’m planning to build a modular network-system, which would consist of several ESP modules. Yes, ESP-NOW would be a valid alternative. Though I was asking myself, how much it would interfere with the use of WiFi AP and ESP-NOW simultaneously.  
Either way, there are alternatives, but figuring this problem out is still important to me.

---

<div class="post-metadata">

**Author:** ![van\_der\_decken](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/van_der_decken/32/1006976_2.png) [@van\_der\_decken](https://forum.arduino.cc/u/van_der_decken)\
**Post date:** [March 25, 2026, 8:36pm UTC](https://forum.arduino.cc/t/i2c-not-correctly-working-between-two-esp32-c3/1437056/12 "2026-03-25T20:36:38Z")

</div>

Your I2C scanner on the master detects another slave, you said. So your master seems to be working.

So let's see your complete slave sketch.

---

<div class="post-metadata">

**Author:** ![vinomakon](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/vinomakon/32/1265337_2.png) [@vinomakon](https://forum.arduino.cc/u/vinomakon)\
**Post date:** [March 25, 2026, 9:11pm UTC](https://forum.arduino.cc/t/i2c-not-correctly-working-between-two-esp32-c3/1437056/13 "2026-03-25T21:11:51Z")

</div>

That were the most complicated hours of trial and error since A LONG TIME... 🙃  
Since the master works, I didn't really change anything there. BUT the `Wire.begin()` is weird, especially if you want to set up different Pins and a specific address.  
So, there is a specific method called `Wire.setPins()` which specifically awaits the Pins for SDA and SCL.  
So instead of writing everything into `Wire.begin()` you write

```arduino
Wire.setPins(SDA_PIN, SCL_PIN);
Wire.begin(SLAVE_ADDRESS);

```

A GRAND oversight, but whatever, we all learn something new. It works now!!!

Also, using GPIO 4 and 5 didn't work for some reason, but that's a different topic.

---

<div class="post-metadata">

**Author:** ![GolamMostafa](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/golammostafa/32/239011_2.png) [@GolamMostafa](https://forum.arduino.cc/u/GolamMostafa)\
**Post date:** [March 26, 2026, 4:37am UTC](https://forum.arduino.cc/t/i2c-not-correctly-working-between-two-esp32-c3/1437056/14 "2026-03-26T04:37:08Z")

</div>

Finally, which pins are working for SDA and SCL in your board which I think is the following one:

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/1/6/b/16bf0cac3820a38606b30bf0f096f05972e8c411.png)  
 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/4/e/1/4e10bcab4b9d7e1faf7f8e9c3de51db9e47b574b.png)

---

<div class="post-metadata">

**Author:** ![vinomakon](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/vinomakon/32/1265337_2.png) [@vinomakon](https://forum.arduino.cc/u/vinomakon)\
**Post date:** [March 27, 2026, 5:09pm UTC](https://forum.arduino.cc/t/i2c-not-correctly-working-between-two-esp32-c3/1437056/15 "2026-03-27T17:09:03Z")

</div>

The same as in the graphic: 8 SDA, 9 SCL

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [September 23, 2026, 5:09pm UTC](https://forum.arduino.cc/t/i2c-not-correctly-working-between-two-esp32-c3/1437056/16 "2026-09-23T17:09:18Z")

</div>

Closed on September 23, 2026, 5:09pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
