Important update: Arm Announces End of Life Timeline for Mbed. This site will be archived in July 2026. Read the full announcement.
PCF8574 I2C IO Expander
Table of Contents
This is an I2C 8 bit IO expander, which you can add up to 8 of to a single I2C bus
Hello World!¶
main.cpp
#include "mbed.h"
#include "PCF8574.h"
PCF8574 io(p9,p10,0x40);
int main(){
while(1) {
io.write(0x0);
wait(0.2);
io.write(0xF);
wait(0.2);
}
}
PCF8574 Hello World! circuit
Library¶
The mbed library for the PCF8574 IO Expander