I am trying to write to a specific register, but value doesn't change.
Working with SenseAir Sunrise CO2:
Info from i2c guideline from sensor manufacter
Measurement Period (EE) 0x96 (MSB) 0x97 (LSB)
Measurement period in seconds (range from 2 to 65534).
Odd numbers will be rounded up to nearest even number.
A system reset is required after changing configuration. Default value is 16.
And that's my code snippet:
int16_t mPeriod = 8;
Wire.beginTransmission(target); // target = 0x68
Wire.write((byte)0x96); //register addr
Wire.write(highByte(mPeriod)); // sends MSB
Wire.write(lowByte(mPeriod)); // sends LSB
error = Wire.endTransmission(true);
delay(EEPROM_UPDATE_DELAY_MS); // = 25ms
Error code is ok, but after reset, register value is the same.
What am i doing wrong? maybe someone can help with that?