From f13d62d44ea0627b2096a936737d1692eaa8bb49 Mon Sep 17 00:00:00 2001 From: Fatima Idrees Date: Mon, 19 May 2025 14:36:24 +0300 Subject: [PATCH] Updating Master.ino file --- examples/Master/Master.ino | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/examples/Master/Master.ino b/examples/Master/Master.ino index dbbf70f..5f7b716 100644 --- a/examples/Master/Master.ino +++ b/examples/Master/Master.ino @@ -1,5 +1,4 @@ -#include -#include "I2CRelay.h" +#include I2CRelay relay(8, 3); // Use your SDA/SCL pins @@ -56,13 +55,11 @@ void setup() { delay(3500); // 10. Change slave address from 0x08 to 0x09 - Serial.println("=== Change Address 0x08 -> 0x09 ==="); - relay.setSlaveAddress(0x08, 0x08); - addr = 0x08; // Use new address for further commands + relay.setSlaveAddress(0x08, 0x10); + addr = 0x10; // Use new address for further commands delay(1500); // 11. Confirm new address by requesting info - Serial.println("=== Request Info from 0x09 ==="); info = relay.requestSlaveInfo(addr); Serial.print("Info: "); Serial.println(info);