My first GitHub Arduino library contribution is a simple library to read… switches. It’s quite trivial, so the library at least offers you a built-in debounce function so you don’t have to reinvent one. The main thing is the digitalSwitch class is designed to minimize the runtime memory footprint so you don’t pay a price for using a library for a trivial thing.
The up side: reading a pin is a one liner boolean test using a library that has similar syntax to the Serial library.
I’d be glad to hear feedback on the approach, as I plan to use the same library design to export a similar interface to more complex sensors pretty soon.
The WS2812B library will be posted later when I figure where I’m going with it because there’s lots of competing offers and limitations prevent me from doing features I want to implement. I will probably focus on providing very efficient palette manipulations to turn AtTiny85 into decent alternatives to DMX and mapping.