Arduino Library

This page presents a collection of Arduino libraries. Some of which implement complex functionalities like Lithium-Ion battery charging, command-line interpreter or DCF77 signal decoding. Others implement simple hardware abstraction layers for the various ATmega features.

A library can be included within src subdirectory under the Arduino project folder. If your project is stored in a Git repository, you can include a library by calling one of the following commands form within the project root directory using SSH and HTTPS authentication respectively:

  • git submodule add ssh://<library> src/<library>
  • git submodule add<library> src/<library>

The above command will include the library as a Git submodule under the src directory within your local repository, whereas <library> is the name of the library’s repository.

Each library consists of a single header file to be included by the main program, as well as one or more source files to be compiled by the Arduino IDE. The IDE will compile by default all the source files that are stored under the src subdirectory.


This library implements an abstraction layer for the Analog to Digital Converter (ADC) of the Atmega328. Following are the main features:

  • Cycle through a list of Analog inputs
  • Perform averaging over several consecutive ADC readings

GitHub repository:

Git commands:

  • git submodule add ssh:// src/Adc
  • git submodule add src/Adc


This library implements the logic of push button control with the following features:

  • Separate action triggers on rising and falling edges
  • Long button press detection

GitHub repository:

Git commands:

  • git submodule add ssh:// src/Button
  • git submodule add src/Button


A library that implements a powerful Command-Line Interpreter (CLI). The CLI receives its command over the Serial interface and translates them into callback function calls. This library is being used by the Lithium-Ion Battery Charger and the Raspberry Pi UPS projects. It features:

  • Passing of arguments to the callback function
  • Multiple aliases per command
  • Help screen
  • Automatic text formatting

GitHub repository:

Git commands:

  • git submodule add ssh:// src/Cli
  • git submodule add src/Cli


Library for decoding the DCF77 radio clock signal originating from an external off-the-shelf DCF77 receiver module. This library has been developed for the DCF 77 Nixie Clock project. It features:

  • Triggering on rising or falling edge of an external pin interrupt
  • Plausibility checking of the decoded timestamp

GitHub repository:

Git commands:

  • git submodule add ssh:// src/Dcf
  • git submodule add src/Dcf


Library for controlling a blinking LED. Featuring:

  • Support for several LED objects
  • Adjustable on/off duration
  • Adjustable finite number of blink cycles
  • Blocking and non-blocking execution modes

GitHub repository:

Git commands:

  • git submodule add ssh:// src/Led
  • git submodule add src/Led


Library for controlling the Constant Current Constant Voltage (CC-CV) Lithium-Ion battery charging process. It can be used for adding Li-Ion battery charging functionality to your Arduino project. This library has been implemented for the Raspberry Pi UPS project. It features:

  • Support for multiple independent parallel charging processes
  • Hardware-independent PWM control via a callback function
  • Failsafe operation and error detection

GitHub repository:

Git commands:

  • git submodule add ssh:// src/LiCharger
  • git submodule add src/LiCharger


General purpose math library. Among others, it features:

  • FIR and IIR filters
  • CRC calculation
  • Hysteresis calculation

GitHub repository:

Git commands:

  • git submodule add ssh:// src/MathMf
  • git submodule add src/MathMf


This library implements a simple abstraction layer over native Arduino EEPROM library. It provides a means of reading and writing a contiguous data buffer into EEPROM. It features:

  • Reducing EEPROM wear by comparing each byte with the corresponding EEPROM copy and only writing the bytes that have been modified.

GitHub repository:

Git commands:

  • git submodule add ssh:// src/Nvm
  • git submodule add src/Nvm

TimerOne / TimerTwo

These libraries provide simple abstraction layers for the ATmega328p’s timers/counters 1 and 2. These libraries are used for setting the time base of the DCF77 Nixie Clock project.

GitHub repositories:

Git commands:

  • git submodule add ssh:// src/TimerOne
  • git submodule add ssh:// src/TimerTwo
  • git submodule add src/TimerOne
  • git submodule add src/TimerTwo


This library provides a simple mechanism for tracing events into a circular buffer. It has been implemented for the Lithium-Ion Battery Charger project. Whereas:

  • The trace data and the trace pointer are saved in EEPROM
  • Tracing is seamlessly resumed following a system reboot

GitHub repository:

Git commands:

  • git submodule add ssh:// src/Trace
  • git submodule add src/Trace
Last updated on March 19, 2020

Leave a Reply

Your email address will not be published. Required fields are marked with an *.