Go Down

Topic: New library: event based switches, task framework and io abstraction. (Read 909 times) previous topic - next topic


I've built a library out of some components that I've used in a few of my own projects, they may well be useful for people building non-trivial applications on the Arduino platform. The library is open source and there's even a forked version of LiquidCrystal that's been altered to use the IO abstraction; as such it can now be configured to work on shift registers, Arduino pins or an 8574 i2c expander.

The library is made up of the following:

  • A task eventing framework that works similarly to an executor framework (or setTimeout in javascript). This also provides simplified interrupt handling (aka signals).
  • A button management component that provides callbacks similar to UI development, with de-bouncing, repeat key, hold presses and rotary encoder support.
  • An IO abstraction that allows regular code (and libraries) to be interchangable between pins, shift registers and PCF8574 i2c devices. More devices could easily be added.

The URL with github links and documentation is:

There's a few rough edges here and there at the moment, and a couple of outstanding issues around power management support, but it's now getting to a point where it's quite usable, but I'd welcome any feedback.
Long time Arduino user who enjoys DIY audio and AV equipment.


I'd welcome any feedback.
Have you seen Cosa?

Post it on github if you want people to try it.  I never take downloads from private sites.
Really, I used to be /dev.  :(


Sorry The download is on GitHub but some of the documentation is on my site:

Long time Arduino user who enjoys DIY audio and AV equipment.


To be honest I looked at cosa and many others before embarking on open sourcing the library we've used internally at the coders corner. 

My view point is that some people just want a very simple library that takes away a few rough edges, I may be wrong. But at the end of the day I think there is room for all solutions to have their niche.
Long time Arduino user who enjoys DIY audio and AV equipment.


Aug 27, 2018, 01:18 pm Last Edit: Aug 27, 2018, 01:21 pm by davetcc Reason: forgot link
I'm not sure if it would be better to start another topic or continue this one, as it has context. Apologies if I made the wrong choice and feel free to move it.

Significant improvements have been made to the IOAbstraction library. My intention is to prepare it for inclusion in library manager, I'm reading through the guide for this.

Firstly, there's a new EEPROM abstraction that supports both AVR and I2C eeprom chips while providing the same interface.

Event based switches have more flexibility and the rotary encoder no longer needs any external components in most cases.

IoAbstraction has more interchangeable  choices and can treat the following similar to Arduino pins:

• Arduino pins
• Shift registers
• PCF8574
• 23017 i2c
• new multi option where up to 8 of the above can be combined.

Interrupt handling is now abstracted too, attaching an interrupt to any of the above abstractions is almost identical to doing so on Arduino pins.

TaskManager has major performance improvements using a linked list ordered by next task up.

Lastly, although possibly not the right place, what is the best practise for writing a few pages about my libraries on playground? I'd like to write some pages showing common usages of my libraries in common combinations.

Source: https://github.com/davetcc/IoAbstraction/

Docs: https://www.thecoderscorner.com/products/arduino-libraries/io-abstraction/basicioabstraction-library-documentation/
Long time Arduino user who enjoys DIY audio and AV equipment.

Go Up