Hi there,
Which BSP are you using for the C6 compile ? The Pin macros may be used in this case if newer, ie. D4 & D5 in both cases.
Can you provide the compiler output for the S3 that works? the first 3 lines and the last 10 -12 before it uploads.
We can take a look. ![]()
HTH
GL
PJ ![]()
meanwhile… Here is why it’s not working.
-
On ESP32-S3,
Wire.onRequest()works because S3 supports I2C slave mode in hardware and in the Arduino core. -
On ESP32-C6, only I2C Master mode is implemented in the Arduino
Wirelibrary as of BSP 3.2.0. " -
Wire.onRequest()is not implemented for ESP32-C6 as of BSP v3.x (and even earlier). -
Wire.slaveWrite()and I2C Slave Mode is not supported on the ESP32-C6 using the ArduinoWirelibrary. -
Even the call:
Wire.begin(0x42, 5, 6, 100000UL);
while syntactically valid, doesn’t actually configure the ESP32-C6 as an I2C slave, because slave mode isn’t available in the current ESP32-C6 Arduino core.
Wait for future support — but no timeline is guaranteed for I2C slave in ESP32-C6 via Arduino.