PCF8574 - On/Off Inputs and Outputs

Very useful I/O modules for turning two wire I2C into parallel. Shift register chips can do the same thing but the I/O lines from the controller are dedicated to that function and with an ESP01 they're at a premium. The picture shown is of a PCF8574 module but the DIP encapsulated chips are available and are easy to wire up though interestingly they have a different address range. 

These circuits get sold with 16x2 and 20x4 LCD modules so they can be used to convert these to I2C if needed, with a reduction in speed. 

They're included here because they're great for controlling relays and getting basic on/off information from other circuits. 

In this IoT system they are a bidirectional item so can be used to publish the state of the pins or can be set via a subscription on MQTT.