This library provides abstractions that help you write event-driven Arduino and mbed applications. It has device abstractions that allow you to treat device pins, PCF8574, MCP23017, MPR121 and AW9523 almost the same in code. This includes higher level interrupt management, buttons with de-bouncing, matrix keyboards, rotary encoders and even LiquidCrystalIO. There are many examples packaged with the library that cover most use cases.

For development, you can use any Arduino or mbed IDE. However, our recommendation is platformIO with Clion or VS Code. We test the library with Arduino and PlatformIO.

Need help with a commercial design, or want a customised version for your hardware, see the consultancy link at the top of the page?

Reference guide and code repo

Digital IO for Arduino and mbed

Analog IO for Arduino and mbed

Switches, keyboards and rotary encoders

EEPROM abstractions

Logging, text utilities and unit testing helper classes

PCF8574 / PCF8575 I2C IoExpander for Arduino and mbed

By dave

IO Abstraction library fully supports the PCF8574 8-bit and PCF8575 16-bit IO expander chips on Arduino and mbed. It requires only two pins (three for interrupt mode) SDA, SCL, and optionally INT. Our driver integrates the interrupt support for you so you can attach interrupts very easily. The PCF8574 provides 8 additional input or output ports, but there are few limitations...

AW9523 I2C IoExpander with LED controller - Arduino and mbed

By dave

IO Abstraction library fully supports the AW9523 16-bit IO expander chips on Arduino and mbed. It requires only two pins (three for interrupt mode) SDA, SCL, and optionally INT. Our driver integrates the GPIO, LED controller, and interrupt support providing nearly all functions using familiar Arduino terminology. This device can even be used in conjunction with an AW9523 analog device ...

MCP23017 I2C IoExpander for Arduino and mbed

By dave

IO Abstraction library fully supports the MCP23017 16-bit IO expander chips on Arduino and mbed. It requires only two pins (three for interrupt mode) SDA, SCL, and optionally INT. Our driver provides nearly all functionality using similar terminology to Arduino itself. The MCP23017 provides 16 additional input or output ports, they have very similar capabilities to device pins and interrupt support...

MPR121 I2C Touch/IoExpander/LED controller - Arduino and mbed

By dave

IO Abstraction library fully supports the MPR121 12-bit Touch control and IO expander chips on Arduino and mbed. It requires only two pins (three for interrupt mode) SDA, SCL, and optionally INT. Our driver integrates the Touch, GPIO, LED controller, and interrupt support providing nearly all functions using familiar Arduino terminology. This device can even be used in conjunction with an...

IoAbstraction: Using a matrix keyboard / keypad

By dave

Matrix keyboards are arranged such that the keys are in a matrix of rows and columns. This means that instead of needing a spare input for each key, one INPUT for each column and one OUTPUT for each row is all that's needed. In order to use the keyboard, we create a class of type and configure it with an...

Arduino Button presses that are handled like events

By dave

Have you ever wanted to treat button presses in Arduino similar to other languages, where you get an event callback when the switch is pressed? Look no further, the IO abstraction library can do that with very little fuss. In fact it can also do the same for rotary encoders as well, treating them similar to how scroll bars work in...

Liquid Crystal fork example using IO Abstraction library - examples

By dave

Recently, I have made a fork of Arduino LiquidCrystal (HD44780 display driver library) that allows the library to work with the IO abstraction library, meaning you can configure a display to use Arduino pins, an i2c 8574 IO expander or shift registers by simply changing one line of code in your sketch. There are two additional examples provided with this version...

EEPROM implementations that are seamless between 8 and 32 bit

By dave

If like me you use both 8 bit AVR and 32 bit boards, you've probably already noticed that there's no EEPROM support on some 32 bit boards. I think that's quite unfortunate as EEPROM storage is very useful for many applications. Relying on memory backup like many systems today do, is nowhere near as reliable (a flat battery loses everything). Further,...

PGA2310 Volume Control device for IoAbstraction

By dave

PGA2310 Volume Control device Provides a simple analog device that can be used to control a PGA2310 volume device. Left channel is 0 and right channel is 1. The device should be connected on the SPI bus as usual. This should work with Arduino now, and mbed in a patch release coming soon. To use first include the header: Then initialise...

Arduino text utilities in IoAbstraction

By dave

IoAbstraction comes with a few text utilities that can be helpful when rendering text as raw character arrays. Internally, IoAbstraction and TcMenu DO NOT use any string objects to avoid runtime memory allocation. See the complete text utility documentation To use the text utilities you need to include the header Often times, we need to build text up within a buffer,...

These may be of interest

We use cookies to analyse traffic and to personalise content. We also embed Twitter and Youtube on some pages, these companies have their own privacy policies.

See the privacy policy and terms of use of this site should you need more information or wish to adjust your settings.