[MUSIC]
Now we're going to look
at a different library.
The I2C library, actually it's called the wire library.
But it supports what's called I2C communication.
So one of the things that you often want to do in a system when you have
a micro controller.
You want to connect it to another integrated circuit.
Some other chip, right.
Maybe it's a memory chip, maybe it's a digital analog converter,
whatever it is right?
You want to connect your micro controller to other chips.
So you can talk to those chips and tell them what to do,
grab data from them and so forth.
So these chips, when they communicate there are several different protocols.
Communication protocols which they can use.
The one we're gonna talk about right here is called I2C.
I2C communication protocol is a serial protocol and it's a synchronous protocol.
So serial means it sends data over only one wire.
Data is only traveling over one wire.
This is good, serial protocols are good because they save bits,
they save pins rather.
You don't need many pins, you just need the one or
in this case you need two total pins, but data is only going across one.
So you need very few pins.
The downside of that is that since it's serial it's sending one bit at a time.
So it takes longer, it's slower.
If you send eight bits in parallel that's a lot quicker than sending one at a time.
So, it's a serial protocol.
Which saves pins, which are important.
Also, it's a synchronous protocol.
What that means is that if there are two communicating entities,
two integrated circuits, talking about I2C, they need to share the same clock.
So they need to get the same clock.