How to Connect an I2C Device to the ESP32-C3 Super Mini

How to Connect an I2C Device to the ESP32-C3 Super Mini

calendar_today ago • schedule2 min read
— Originally published at goelectronic.org

Connecting an I2C Device to the ESP32-C3 Super Mini
Wiring

The ESP32-C3 lets you route I2C to almost any GPIO, but the Super Mini’s board silkscreen and common examples use these:

I2C device pinESP32-C3 Super Mini pin
VCC3V3 (3.3 V)
GNDGND
SDAGPIO8
SCLGPIO9

Things to watch:

GPIO8 and GPIO9 are strapping pins. GPIO9 is tied to the BOOT button, and GPIO8 is also used at boot. Many people use them for I2C successfully, but if the board won’t boot or flash, an I2C device pulling those lines low is a likely cause. Alternatives such as GPIO4 (SDA) and GPIO5 (SCL) are safer; just specify them in code.
Onboard LED: On many Super Mini boards the LED is on GPIO8 (some on GPIO10), which can cause a faint glow or slight loading on the SDA line.
Pull-ups: I2C needs pull-up resistors (typically 4.7 kΩ to 3.3 V) on SDA and SCL. Most breakout modules (OLEDs, BME280, MPU6050, etc.) already include them. If you’re using a bare chip or things are flaky, add them.
Voltage: The ESP32-C3 is 3.3 V logic and not 5 V tolerant. If your device is 5 V-only, use a level shifter.
Arduino Code

Select the board ESP32C3 Dev Module and enable USB CDC On Boot so Serial works over USB.

I2C scanner (verify your wiring)
cpp

include <Wire.h>

define SDA_PIN 8

define SCL_PIN 9

void setup() {
Serial.begin(115200);
delay(1000);
Wire.begin(SDA_PIN, SCL_PIN);
Serial.println("Scanning I2C bus...");
}

void loop() {
int found = 0;
for (uint8_t addr = 1; addr < 127; addr++) {

Wire.beginTransmission(addr);
if (Wire.endTransmission() == 0) {
  Serial.print("Found device at 0x");
  Serial.println(addr, HEX);
  found++;
}

}
if (!found) Serial.println("No I2C devices found");
delay(3000);
}

If your device shows up (e.g. 0x3C for an SSD1306 OLED, 0x76/0x77 for a BME280, 0x68 for an MPU6050), the hardware is working.

Example: SSD1306 OLED

Install Adafruit SSD1306 and Adafruit GFX from the Library Manager:

cpp

include <Wire.h>

include <Adafruit_GFX.h>

include <Adafruit_SSD1306.h>

Adafruit_SSD1306 display(128, 64, &Wire, -1);

void setup() {
Wire.begin(8, 9);
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
display.clearDisplay();
display.setTextSize(2);
display.setTextColor(SSD1306_WHITE);
display.setCursor(0, 0);
display.println("Hello C3!");
display.display();
}

void loop() {}
MicroPython
python
from machine import Pin, I2C

i2c = I2C(0, scl=Pin(9), sda=Pin(8), freq=400000)
print([hex(a) for a in i2c.scan()])
Troubleshooting
No devices found: Check that SDA and SCL aren’t swapped, GND is shared, and VCC is 3.3 V. Try a lower speed with Wire.setClock(100000);.
Can’t upload after wiring: Disconnect the I2C device (or move to GPIO4/5), then hold BOOT while plugging in USB to enter download mode.
Serial output missing: Enable USB CDC On Boot in the Tools menu.
Long wires / multiple devices: Keep wires short, use 100 kHz, and make sure addresses don’t conflict.

🔥 Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.

More Posts

I’m a Senior Dev and I’ve Forgotten How to Think Without a Prompt

Karol Modelski - Mar 19

Breaking the AI Data Bottleneck: How Hammerspace's AI Data Platform Eliminates Migration Nightmares

Tom Smithverified - Mar 16

AAIF Hits 10 Projects. Its CTO on What to Adopt Now and the Security Gaps Left Open

Tom Smithverified - Oct 23

A Textile Mill's Dyehouse Ramp Curve: Get One Step Wrong and the Sheet Belongs to the Master

aiomniu - Oct 18

The Sovereign Vault — A Comprehensive Guide to Protocol-Driven AI

Ken W. Algerverified - Jun 4
chevron_left
121 Points • 2 Badges
1Posts
0Comments
I'm an AI enthusiast who loves exploring new tools, experimenting with AI coding, and building cool ... Show more

Related Jobs

View all jobs →

Commenters (This Week)

13 comments
2 comments
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!