Unable to write i2c device

Typically this has one of the following reasons:

  • Wiring issue
  • Wrong pins chosen on the board
  • Not having enabled I2C or wrong baud rate set. Ref to enabling-i2c