[SOLVED] Arduino Due & The Wire Library

After some test I can share my experience on Wire library.

SCL and SDA are on the same bus of SCL1 and SDA1 so it is useless to use the second one.

It is necessary add a pull-up on both I2C pins.

The address my be translate to 7bit so shift the value one bit to the right.

From original 0x20 = 32 = 00100000 to 0x10 = 16 = 00010000.

Other library like PIC Microchip and STM32 does not require this address change.

#include <Wire.h>

void writeRegister( uint8_t reg, uint8_t val)
{
Wire.beginTransmission(16);
Wire.write( reg );
Wire.write( val );
Wire.endTransmission();

delayMicroseconds(5000);
}

setup()
{
Wire.begin();
}