Wire

There is a TWI (Two Wire Interface) port available on the Wiring board named Wire. On Wiring v1 boards the SCL and SDA pins are: 0 and 1.
On Wiring S board the SCL and SDA pins are: 8 and 9.

 

Wire
Wiring TWI port available on pins SCL and SDA.

beginTransmission()
Starts data transmission to the specified device.

endTransmission()
Marks the end of a transmission to a device.

begin()
Initiates the TWI as a Master or a slave using the address specified.

onReceive()
Set the function that executes whenever data is received as a slave device.

onRequest()
Set the function that executes whenever data is requested by a master from this device.

read()
Read a byte received from a device.

peek()
Peek the next byte of data in serial port buffer. This doesn't retrieve the actual byte from the buffer. Returns -1 If no data is available..

requestFrom()
Start reading a specified number of bytes from the device specified with a given address.

available()
Returns the number of bytes available.

write()
Write data to a device.