#include void setup() { Wire.begin(); // join i2c bus (address optional for master) Serial.begin(9600); // start serial for output } void loop() { Wire.requestFrom(8, 1); // request 1 byte from peripheral device #8 while (Wire.available()) { // peripheral may send less than requested char c = Wire.read(); // receive a byte as character Serial.print(c); // print the character if (c == '1'){ Serial.println("Button not pushed"); } else{ Serial.println("Button pushed!!"); } } delay(500); }