Xiao ESP32S3 / esphome : Why do docs show using pin 6/7 for i2c, but pintout shows 5/6?

so if you look at ESPHome Support on Seeed Studio XIAO ESP32S3 | Seeed Studio Wiki it shows that for grove expansion board to use sda: GPIO6 scl: GPIO7, but looking at the actual pins, they are GPIO5 and 6. I ask because I can’t either to work, but am wondering why the difference. If anyone could share a working esphome yaml that shows how to connect a standalone i2c sensor, and how you actually connected it that would be great.
Thanks.

Hi there,
Yes it is confusing, some use the physical pin numbers, others use the Chips Logic pin number and some use the Name of the GPIO… Sux IMO.
I try PIN names first , ie. A4, A5
then pin numbers, 5, 6;
then GPIO’s 5,6;
Should work when you set the correct pins.
HTH
GL :slight_smile: PJ

Post up the code we can look.

So that tutorial says below, but it looks like the Grove expansion has I2C on what is in pins D4, and D5, which is what I have connected my wires to, but am not getting anything showing up on I2C bus. esphome uses yaml and not code.

# I2C configuration for BME680 sensori2c:  sda: GPIO6  scl: GPIO7,

I just got it working using below. I think it was the bus_b that finally got it working. I have the pins wire exactly as shown in pinout.

i2c:
  sda: GPIO5
  scl: GPIO6
  scan: true
  id: bus_b

And the Correct pins too.
Good Job.
GL :slight_smile: PJ

1 Like