Changing I2C address

I have just bought 3 HMC5883l sensors(digital magnet compass).It works over I2c communication.How can i change the address of each to communicate all of them with one arduino?

As far as I can tell from the datasheet, the I2C address on the HMC5883 cannot be changed. It refers to the address as a "factory default", which might be taken to imply that it can be changed, but I can find no indication that it can be.

Some devices have a way to change it, but most do not; always read the datasheet before buying parts to make sure they'll meet your needs.

Thank you very much.!!

It looks like the sensor does not have an Enable input, otherwise you may have been able to enable / disable each one individually using spare Arduino pins.

One approach that should work, however, is to use an external I2C multiplexer IC like the PCA9544A. This would sit between the Arduino and the sensors and each sensor has its own "private" I2C bus from the multiplexer. By writing commands to the multiplexer, your code could select each sensor in turn and then read / write from it through the multiplexer.