I’m trying to change the I2C address of a 4-channel relay because I want to use two of them, and from factory they both have 0x11. Since there’s no library from Seeed I need to use lunix command. I found this: ./addresschange (i2c address) (new i2c address) but I think I need to find the directory of this command. Any other ideas besides using another bus ?
Serial.println("Start write address");
relay.changeI2CAddress(old_address, 0x11); /* Set I2C address and save to Flash */
Serial.println("End write address");
changeI2CAddress(uint8_t old_addr, uint8_t new_addr) change the device address,the old_addr is the current address; the new_addr is the address which you want to use. The new address can be successfully set only by entering the correct old address.
This has been more of a headache for us and we have scheduled to verify and resolve this issue, but this product has not been in stock … We need to wait for the product to be in stock before we can move forward to the next step, so sorry for the inconvenience this has caused you.
Previous example for 4-relay chip I2C address works.
Where is documentation for this feature? There might be multiple protocol versions. One thing is to read firmware version and identify what protocol device should follow. The github repo Multi_Channel_Relay_Arduino_Library is dated 2020 and there might be changes. My PCB has text “4-Channel SPDT Relay v1.0”.
Newest chips might be simplified? In my case
bus.write_byte_data(0x11, 0x10, 0x2) sets relay 2 to ON, as expected. Not found way to ask current status or firmware version. I suppose that firmware is not 1.255.255.