

There are several files in that path, including the example code that is available to you in the IDE, but the heart of I2C communications with an Arduino resides in four files… The library and files all contain the word “wire” because Atmel (the chip at the heart of the Arduino) devised a system called “Two Wire Interface” or “TWI” which is their flavor of I2C. Arduino/libraries/Wire directory on the machine you write your code on. The Wire Library is a series of files in plain text that exist in the.

Additionally, if you wish to replicate the oscilloscope traces, use any two channel oscilloscope capable of reading a 100kHz signal connected to the SDA and SCL lines between an Arduino and any I2C chip, and then send each function listed below as necessary with sufficient delay time in between to allow you to view the resulting scope trace. Be very careful when opening those files though, that you don’t modify them or you’ll need to reinstall everything from scratch. No setup is required, however you can access the files that comprise the wire library in the program folders installed with your Arduino IDE. No schematic is associated with this module. Understand which functions are used with an Arduino Master and which are used with an Arduino Slave.Know which functions actually cause data to transmit and which are only preparatory.Learn the nine Wire Library functions and their purpose.

Understand why the code is called the Wire Library and not the I2C Library.Now that we have a firm understanding of how we need to structure the signals to communicate with an I2C component, let’s look at the Arduino Wire Library that will actually manage all of that signaling for us.
