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.
Read a byte received from a device.
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..
Start reading a specified number of bytes from the device specified with a given address.
Returns the number of bytes available.
Write data to a device.