- A .NET Nanoframework class library for PCF8574 - I2C 8-Bit I/O Expander
- Based on Arduino C/C++ library xreef/PCF8574_library
- Tested on ESP32 TTGO with custom board
Image source from TI site: https://www.ti.com/ds_dgm/images/fbd_scps068j.gif
// My Red LED is in P1
const int RED_LED = 1;
// Init a new instance of the PCF8574 class with I2C address of the device
var pCF8574 = new PCF8574(I2C_DEVICE_ADDR, 2);
// Set P1 to Output
pCF8574.SetPinMode(RED_LED, PinMode.Output);
pCF8574.Write(RED_LED, PinValue.High);