Arduino Libraries!

So in my extended absence, I’ve been a busy man.  I have a lot to share so I’ll try and get it all out there, but since I’ve already been talking about Arduino, I figured I’d bring you up to speed on some Arduino libraries I worked on:


I’ve already discussed JoystickLib. Not much has changed except now it is also available as a library package for PlatformIO.


Same as JoystickLib, I’ve already talked about this one, but now this one is also available as a library package for PlatformIO.


This is a pretty big library. Also a library package for PlatformIO.  My original intent with this one was to build a sort of Hardware Abstraction Framework that would give peripheral support to a number of common components used with Arduinos (such as relays, buttons, buzzers, etc) and allow for ‘events’ so that your sketch could react to things that happen with those components.  And this library does exactly that but has started to become a bit of a ‘everything-but-the-kitchen-sink’ library. So the first thing I had to do is to force users to only include the libraries they need to keep their code small and not bloat their sketches with unused code. In other words, don’t allow the user to include the whole damn framework just to be able to use a relay (for example). Code size is important on Arduino and most other embedded platforms. That being said, there is a bunch of useful stuff in there especially for tinkerers.


This came as a result of using network shields with Arduino. Some of them inexplicably lock up every so often.  What this library does is log the crash address to EEPROM and then let you retrieve the crash reports after restart (by dumping them to the serial port). Basically, it makes use of the AVR WatchDog Timer (WDT) functionality. It registers an ISR and if the ‘keepalive’ signal isn’t sent to the watchdog by a certain period of time, the watchdog considers the program to be hung and executes a handler that then logs the offending address and data to EEPROM. You can even specify your own callback method to execute when this happens. And yes, it is library package for PlatformIO.


This library created to fill the need I had to support HID proximity key-fob readers for an Arduino-based access control system I built for my employer. It provides support for 26bit Weigand and 35bit HID Corporate 1000 fobs. It is also available as a library package for PlatformIO.

The very best Arduino IDE

Ok ok ok…. I know… I’ve written about this topic more than once. I’ve used a number of IDEs, editors, etc for Arduino and other embedded board development and then about a year or 2 ago I stumbled on PlatformIO.  If you are not already familiar with it, then GO GET familiar.  Basically, it’s a few Atom plugins with some underpinnings that provides not only all the stuff you would expect from an Arduino IDE (terminal, upload, compile, serial monitor, etc), but also provides support for a ton of other boards (like over 400 embedded boards) its own project and package management system, plus since it’s combined with Atom, you get all the nice features of Atom itself. And like Atom, PlatformIO is *cross-platform*.  I’ve personally used it on Linux, MacOS, and Windows. Setup is relatively simple and you can even write and publish your own libraries, which other users can then access via the library manager (either via the registry, the command line, or built-in GUI).

I’ve even used it to write stuff for the Raspberry Pi.  As far as I’m concerned, this is the only embedded IDE I need.