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.
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.
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.