I2C Wire.write() command

I am learning I2C protocol with MPU 6050 module.
In i2c setup in sketch, is writing a data to a certain register always done by setting up the address like Wire.write(0x6B) followed by the same command, which is Wire.write(0)?

You send the address of the register then the value that goes into the register. So if you want to write 0x00 to register 0x6b, yes that is what to do.

That makes sense. Thanks a lot :slight_smile:

You have to address first the MPU6050 chip that contains the register with address 0x6B and then you write the desired data into that register.

Wire.beginTransmission(MPU6050Address);
Wire.write(0x6B);  //register Address);
Wire.write(0x00);   //data for the above register
Wire.endTransmission;