Wire (I2C)

begin()

Initiate the Wire library and join the I2C bus as a master or slave. This should normally be called only once.

// SYNTAX
Wire.begin(); // I2C master mode
Wire.begin(address); // I2C slave mode

// PROTOTYPES
void begin();
void begin(uint8_t);
void begin(int);

Parameters: address: the 7-bit slave address (optional); if not specified, join the bus as an I2C master. If address is specified, join the bus as an I2C slave. If you are communicating with I2C sensors, displays, etc. you will almost always use I2C master mode (no address specified).