Difference between revisions of "I2C + Arduino"

From ESE205 Wiki
Jump to navigation Jump to search
Line 1: Line 1:
[[File:I2cA.png|right]]
+
[[File:I2cA.png|center]]
  
The ''[https://www.arduino.cc/en/Reference/Wire (Wire library)]'' allows communication between the Arduino and other I2C compatible devices, for example another Arduino. To connect an I2C device, you must connect data(SDA) and clock(SCL) pins together, on the Uno these are pins A4 and A5. Also, both devices must share the same ground.
+
The ''[https://www.arduino.cc/en/Reference/Wire (Wire library)]'' allows communication between the Arduino and other I2C compatible devices, for example another Arduino. To connect an I2C device, you must connect data(SDA) and clock(SCL) pins together, on the Uno these are pins A4 and A5. Also, both devices must share the same ground. Below is an example of a master reading from a slave.  
  
 
[[File:Master.png|left|600px]]
 
[[File:Master.png|left|600px]]
[[File:slave|right]]
+
[[File:Slave.png|right|600px]]
  
 
[[Category:HowTos]]
 
[[Category:HowTos]]

Revision as of 21:31, 13 December 2016

I2cA.png

The (Wire library) allows communication between the Arduino and other I2C compatible devices, for example another Arduino. To connect an I2C device, you must connect data(SDA) and clock(SCL) pins together, on the Uno these are pins A4 and A5. Also, both devices must share the same ground. Below is an example of a master reading from a slave.

Master.png
Slave.png