Control any devices using Raspberry PI and PCF8574, relay module
![](https://fritzing-data.s3.eu-central-1.amazonaws.com/05f4b2de93bd0bd866b8db41e567596d.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA2HCNQME5J5JNR5LX%2F20250125%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20250125T034003Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=c306ecd9d7e105bc4d845fe89a942be44a84ddd091c9df6ae7c53856521eb466)
This guide shows you how to use PCF8574 with Raspberry PI. The PCF8574 is a 8 bits I/O port expander that uses the I2C bus. To the PCF8574 I will connect the relay module, this will allow control of the electrical device from the Raspberry PI. I will also show an example how to write a program to handle PCF8574 in C++ on Linux.
This guide shows you how to use PCF8574 with Raspberry PI. The PCF8574 is a 8 bits I/O port expander that uses the I2C bus. To the PCF8574 I will connect the relay module, this will allow control of the electrical device from the Raspberry PI. I will also show an example how to write a program to handle PCF8574 in C++ on Linux.
Step 1: Components
Components I used in this example.
See more:
Control any devices using Raspberry PI and PCF8574, relay module