Trying to hack my 6130 I2C address via command mode after successfully reading temp/humidity with code similar to nora. Command mode reference details are here. A 7-bit address, a write bit (0), and Start_CM (0xA0) w/n 3ms of power-up enables command mode (any further delay after power-up drops you into measure/fetch mode). A byte status provides status + diagnostics + response bits. It appears that I’m not getting in quick enough. No subaddress is required by 6130.
I’m attempting the write/read sequence as follows to get into command mode:
`
// HiH-6130 command mode h4x
imp.configure(“HiH-6130-CmdMode”, [], []);
hardware.configure(I2C1_89); // SCL=8, SDA=9
local i2c = hardware.i2c1;
server.log(i2c.write(0x27 << 1, format("%c", 0xA0)));
server.log(i2c.read(0x27 << 1 | 1, “”, 1)[0] >> 6); // getting 1, expecting 2
`
I’m getting “stale data” status bits, implying I’m not getting into command mode. I’ll ultimately need to get into command mode, read EEPROM to confirm my I2C address, alter my address (I actually need three 6130s on the I2C bus), then confirm new changed address.
TIA,
Dirk