// Include the required Wire library for I2C
#include int x = 0; void setup() { // Start the I2C Bus as Master Wire.begin(); } void loop() { Wire.beginTransmission(9); // transmit to device #9 Wire.write(x); // sends x Wire.endTransmission(); // stop transmitting x++; // Advance x if (x > 5) x = 0; // reset x once it gets 6 delay(1000); }