#include Wire.h const int sensorPin = D10; // PIN OF XIAO ESP32 C3 void setup() { Wire.begin(); // Start I2C communication pinMode(sensorPin, INPUT); } void loop() { int sensorValue = digitalRead(sensorPin); Wire.beginTransmission(9); // Slave address Wire.write(sensorValue); Wire.endTransmission(); delay(1000); // Wait for 1 second before reading the sensor again }