![]() ![]() These mods can be run simultaneously on the devices that are connected. Now that we have everything set up properly we will show two modes of programing the I2C.įirst one will be MasterWriter-SlaveReciever, second one is MasterReader-SlaveSender. In case that is not there you can download it form HERE. For enabling the I2C communication we will need WIRE LIBRARAY, which should come with Arduino programing tool by default. The SDA is the data carrier signal, basically the transmission wire.Īfter we have connected the hardware properly now it is time to start the programing. The SLC is the clock signal which synchronizes the data transfer between devices and it is generated by the master device. The two wires are: Serial Clock (SLC) and Serial Data (SDA). Simply said the signal from the master goes to all of the slaves but only the slave with the correct address is going to react on the signal. Therefore the master can easily know with which slave it communicates. I2C uses only 2 wires because each device has a unique address assigned to it. Reason for I2C easy implementation comes from the fact that only 2 wires are needed for communication, we do need to connect the devices to the common ground as well but the ground is not directly used in the communication. ![]() I2C communication is very popular and broadly used, because of its easy implementation in electronic devices. After the basics are explained we will show an example how to blink an LED using the I2C through a serial monitor. Here we will talk about I2C communication between two Arduinos.įirst we will mention how to set up an Arduino as either a master or a slave.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |