Programming the I2C interface
In this section, we will review how to obtain useful data from the MLX90614 temperature sensor to be transmitted using the I2C protocol, also known as IIC. It is a serial data communication protocol that is practical for interfacing sensors, LCDs, and other devices to microcontroller boards that support I2C. The next section defines what I2C is.
The I2C protocol
I2C is a synchronous serial communication protocol that allows interconnecting sensors, microcontrollers, displays, analog-to-digital converters (ADCs), and so on, at a short distance using a common bus (a bus works as a main digital road). The I2C bus is composed of a few lines (wires) that all the devices share and use for transmitting and exchanging data. The I2C protocol is practical and beneficial because it uses only two wires for data communication. Another benefit of I2C is that in theory, it can support up to 1,008 devices connected to the same I2C bus! It is also worth mentioning...