/PCF8574lib

Nanoframework Class Library for PCF8574 I2C 8-Bit I/O Expander

Primary LanguageC#MIT LicenseMIT

Nanoframework Class Library for PCF8574 I2C 8-Bit I/O Expander 🔌

👓 Overview

PCF8574 Block Diagram

Test Image source from TI site: https://www.ti.com/ds_dgm/images/fbd_scps068j.gif

⌨️ Example

            // 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);

📜 License

MIT License