Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Wire.h>
- #define ESP32_ADDRESS 0x10
- void setup() {
- Wire.begin(); // Initialize I2C bus
- Serial.begin(9600); // Initialize serial communication
- }
- void loop() {
- // Data to send to ESP32 Xiao C3
- byte data[] = {0x01, 0x02, 0x03, 0x04, 0x05};
- // Send data to ESP32 Xiao C3
- Wire.beginTransmission(ESP32_ADDRESS);
- Wire.write(data, sizeof(data));
- Wire.endTransmission();
- Serial.println("Data sent");
- // Wait for some time
- delay(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment