
189Chapter 7: Sensors
The following connections are made between any I2C sensor and the
microcontroller:
SCL Serial clock pin—pulses on this pin provide the timing for the
communication
SDA Serial data pin—the wire on which the actual data is sent and
received
gnd Share a common ground with the microcontroller
3 V Supply with 3.3 V pin from the microcontroller
On some boards, SCL and SDA are clearly marked. (For instance, on
the CPX, SDA is A4 and SCL is A5.) But if not, be sure to check board’s
pinout diagram.
A neat aspect of working with I2C devices is that they can be connected
together in a chain. This means they don’t take up lots of pins ...