Changing Address on Hygrosens HYT221 using Arduino sketch

Hi Everybody!

Well, I am using an simple ARDUINO UNO (SMD version), to set up an I2C communication with my HYGROSENS HYT 221 humidity sensor.

I am trying to change the default address of this sensor from 0x28 to 0x30, leading to which I just tried the code given below…
The serial monitor shows evrything fine… It says the address have been changed and its done… but when I again run the I2C scanner program in the microcontroller, it should ideally now detect the sensor at the new changed address BUT SURPRISINGLY, it detects the sensor again at the default address = 0x28.

This is really confusing… Can you guys please help me… It is something with the sketch used…?

Thank you guys so much in advance!! :slight_smile: :slight_smile:



Sketch-Address change.txt (1.74 KB)