Reference.Wire History

Hide minor edits - Show changes to markup

April 01, 2013, at 05:56 PM by Scott Fitzgerald -
Changed lines 2-4 from:
to:
Added lines 19-24:
Changed lines 36-40 from:

Note

There are both 7- and 8-bit versions of I2C addresses. 7 bits identify the device, and the eighth bit determines if it's being written to or read from. The Wire library uses 7 bit addresses throughout. If you have a datasheet or sample code that uses 8 bit address, you'll want to drop the low bit (i.e. shift the value one bit to the right), yielding an address between 0 and 127.

to:
October 22, 2012, at 04:55 PM by Federico -
Changed lines 3-6 from:

This library allows you to communicate with I2C / TWI devices. On the Arduino boards with the R3 layout (1.0 pinout), the SDA (data line) and SCL (clock line) are on the pine headers close to the AREF pin. The Arduino Due has two TWI interfaces SDA1 and SCL1 are in the near to the AREF pin and the additional one is on pins 20 and 21.

The table below shows where TWI pins are displaced on various Arduino boards.

to:

This library allows you to communicate with I2C / TWI devices. On the Arduino boards with the R3 layout (1.0 pinout), the SDA (data line) and SCL (clock line) are on the pin headers close to the AREF pin. The Arduino Due has two I2C / TWI interfaces SDA1 and SCL1 are near to the AREF pin and the additional one is on pins 20 and 21.

As a reference the table below shows where TWI pins are located on various Arduino boards.

Changed line 8 from:
BoardTWI pin
to:
BoardI2C / TWI pins
October 22, 2012, at 04:12 PM by Federico -
Changed line 8 from:
Boardinterrupt pin (interrupt number)
to:
BoardTWI pin
October 22, 2012, at 04:09 PM by Federico -
Changed lines 3-4 from:

This library allows you to communicate with I2C / TWI devices. On most Arduino boards, SDA (data line) is on analog input pin 4, and SCL (clock line) is on analog input pin 5. On the Arduino Mega, SDA is digital pin 20 and SCL is 21.

to:

This library allows you to communicate with I2C / TWI devices. On the Arduino boards with the R3 layout (1.0 pinout), the SDA (data line) and SCL (clock line) are on the pine headers close to the AREF pin. The Arduino Due has two TWI interfaces SDA1 and SCL1 are in the near to the AREF pin and the additional one is on pins 20 and 21.

The table below shows where TWI pins are displaced on various Arduino boards.

Boardinterrupt pin (interrupt number)
Uno, EthernetA4 (SDA), A5 (SCL)
Mega256020 (SDA), 21 (SCL)
Leonardo2 (SDA), 3 (SCL)
Due20 (SDA), 21 (SCL), SDA1, SCL1

March 14, 2012, at 06:09 PM by Scott Fitzgerald -
Deleted line 9:
Changed lines 14-15 from:
to:
March 14, 2012, at 06:08 PM by Scott Fitzgerald - making functions consistent with other Library doc pages
Changed lines 10-12 from:
to:
Changed lines 17-19 from:
to:
October 28, 2011, at 11:08 PM by Scott Fitzgerald -
Changed lines 5-6 from:

As of Arduino 1.0, the library inherits from the Stream functions, making consistent with other read/write libraries. Because of this, Wire.send() and Wire.receive() have been replaced with read() and write().

to:

As of Arduino 1.0, the library inherits from the Stream functions, making it consistent with other read/write libraries. Because of this, send() and receive() have been replaced with read() and write().

October 28, 2011, at 10:30 PM by Scott Fitzgerald - changed send and receive to read & write
Added lines 5-6:

As of Arduino 1.0, the library inherits from the Stream functions, making consistent with other read/write libraries. Because of this, Wire.send() and Wire.receive() have been replaced with read() and write().

Changed line 14 from:
to:
Changed line 16 from:
to:
May 17, 2009, at 10:40 PM by David A. Mellis -
Changed lines 3-4 from:

This library allows you to communicate with I2C / TWI devices. On the Arduino, SDA (data line) is on analog input pin 4, and SCL (clock line) is on analog input pin 5.

to:

This library allows you to communicate with I2C / TWI devices. On most Arduino boards, SDA (data line) is on analog input pin 4, and SCL (clock line) is on analog input pin 5. On the Arduino Mega, SDA is digital pin 20 and SCL is 21.

July 23, 2008, at 08:17 PM by David A. Mellis -
Changed lines 20-21 from:

There are both 7- and 8-bit versions of I2C addresses. 7 bits identify the device, and the eighth bit determines if it's being written to or read from. The Wire library uses 7 bit addresses throughout. If you have a datasheet or sample code that uses 8 bit address, you'll want to drop the low bit, yielding an address between 0 and 127.

to:

There are both 7- and 8-bit versions of I2C addresses. 7 bits identify the device, and the eighth bit determines if it's being written to or read from. The Wire library uses 7 bit addresses throughout. If you have a datasheet or sample code that uses 8 bit address, you'll want to drop the low bit (i.e. shift the value one bit to the right), yielding an address between 0 and 127.

July 02, 2008, at 05:50 PM by David A. Mellis -
Changed lines 15-17 from:
to:
July 02, 2008, at 05:21 PM by David A. Mellis -
Added line 19:
July 02, 2008, at 05:08 PM by David A. Mellis -
Added lines 16-18:

Note

There are both 7- and 8-bit versions of I2C addresses. 7 bits identify the device, and the eighth bit determines if it's being written to or read from. The Wire library uses 7 bit addresses throughout. If you have a datasheet or sample code that uses 8 bit address, you'll want to drop the low bit, yielding an address between 0 and 127.

May 07, 2008, at 07:25 PM by David A. Mellis -
Changed lines 3-4 from:

This library allows you to communicate with I2C / TWI devices.

to:

This library allows you to communicate with I2C / TWI devices. On the Arduino, SDA (data line) is on analog input pin 4, and SCL (clock line) is on analog input pin 5.

Changed lines 12-15 from:
to:
May 07, 2008, at 07:22 PM by David A. Mellis -
Added lines 1-12:

Wire Library

This library allows you to communicate with I2C / TWI devices.

Functions

Share