{"id":386,"date":"2019-10-12T12:04:26","date_gmt":"2019-10-12T17:04:26","guid":{"rendered":"https:\/\/robotsbench.com\/?p=386"},"modified":"2022-03-14T09:25:00","modified_gmt":"2022-03-14T14:25:00","slug":"i2c-communication-arduino","status":"publish","type":"post","link":"https:\/\/robotsbench.com\/i2c-communication-arduino\/","title":{"rendered":"How to use i2C with Arduino"},"content":{"rendered":"
I hope that the products recommended here will help you build great projects. Just so you know, if you buy through the links on this page on Amazon or Banggood (among others), RobotsBench may get a small share of the sale (as an Amazon affilate, I earn from qualifying purchases). This helps to keep the site alive and allow me to write more articles. Thank you!<\/div>\n

The i2C protocol is one of the most popular way to communicate with sensors and devices with an Arduino<\/a>. This protocol was built to limit the pins needed and to standardize the communication so you don’t have to figure out a proprietary format each time. But how to use i2C with an Arduino?<\/p>\n\n\n\n

A i2C devices uses two specific pins the Arduino to communicate: one pin is for data (SDA) and the other is for the clock (SCL). <\/p>\n\n\n\n

Each device has a specific address, so many devices can be added to the same bus without using up extra pins. The logic level of the communication (generally 3.3V or 5V) depends on the master, so each slave device must be able to work at that level. <\/p>\n\n\n\n

Everything is driven by the master node, which generates the clock and manages the communication with all the slave devices. There are theoretically 127 addresses available for slave devices, but you can realistically connect around 6-10 devices. BlueDot has an excellent explanation of what really limits the number of devices at https:\/\/www.bluedot.space\/tutorials\/how-many-devices-can-you-connect-on-i2c-bus\/<\/a>. <\/p>\n\n\n\n