#include int led = 4; //led pin int i = 0; void setup() { Serial.begin(115200); //Begin Communication, no need for any address because this is the master Wire.begin(); pinMode(led, OUTPUT); } void loop(){ //This is the part where the control requests data from a node //Wire.requestFrom("address of node", "amount of bytes to request", true or false to not cut or cut communication) Wire.requestFrom(1,64); //requesting 64 bytes from node1 while(Wire.available()){ int c = Wire.read(); if(c == 5){ Serial.println("Button on node1 was pressed"); // blink led 4 times for (i = 0; i <= 3; i++) { digitalWrite(led, HIGH); delay(200); digitalWrite(led, LOW); delay(200); } } Wire.requestFrom(2,64); //requesting 64 bytes from node2 while(Wire.available()){ int c = Wire.read(); if(c == 8){ Serial.println("Button on node2 was pressed"); // blink 4 times for (i = 0; i <= 3; i++) { digitalWrite(led, HIGH); delay(200); digitalWrite(led, LOW); delay(200); } } } } }