A class for PCF8574.

Last Modified:

December 14, 2013, at 05:51 AM

By:

robtillaart

Intro

The I2C bus can be used to extend the number of IO lines. A frequently used chip for this is the PCF8574 which offers 8 IO lines. The PCF8474 has multiple address lines so the I2C address can be changed.

PCF8574 library

The library supports

read and write (1 pin),

read8 and write8 (all pins),

toggle(pin),

leftShift(n) and rightShift(n),

value() returns the last value read.

lastError() returns the last I2C error code. (0 ==> OK)

Installation notes

To use the library, make a folder in your SKETCHBOOKPATH\libaries with the name PCF8574 and put the .h and .cpp there.