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://git@github.com/microfarad-de/<library> src/<library>
  • git submodule add https://github.com/microfarad-de/<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.

Adc

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: https://github.com/microfarad-de/Adc

Git commands:

  • git submodule add ssh://git@github.com/microfarad-de/Adc src/Adc
  • git submodule add https://github.com/microfarad-de/Adc src/Adc

Button

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: https://github.com/microfarad-de/Button

Git commands:

  • git submodule add ssh://git@github.com/microfarad-de/Button src/Button
  • git submodule add https://github.com/microfarad-de/Button src/Button

Cli

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: https://github.com/microfarad-de/Cli

Git commands:

  • git submodule add ssh://git@github.com/microfarad-de/Cli src/Cli
  • git submodule add https://github.com/microfarad-de/Cli src/Cli

Dcf

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: https://github.com/microfarad-de/Dcf

Git commands:

  • git submodule add ssh://git@github.com/microfarad-de/Dcf src/Dcf
  • git submodule add https://github.com/microfarad-de/Dcf src/Dcf

Led

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: https://github.com/microfarad-de/Led

Git commands:

  • git submodule add ssh://git@github.com/microfarad-de/Led src/Led
  • git submodule add https://github.com/microfarad-de/Led src/Led

LiCharger

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: https://github.com/microfarad-de/LiCharger

Git commands:

  • git submodule add ssh://git@github.com/microfarad-de/LiCharger src/LiCharger
  • git submodule add https://github.com/microfarad-de/LiCharger src/LiCharger

MathMf

General purpose math library. Among others, it features:

  • FIR and IIR filters
  • CRC calculation
  • Hysteresis calculation

GitHub repository: https://github.com/microfarad-de/MathMf

Git commands:

  • git submodule add ssh://git@github.com/microfarad-de/MathMf src/MathMf
  • git submodule add https://github.com/microfarad-de/MathMf src/MathMf

Nvm

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: https://github.com/microfarad-de/Nvm

Git commands:

  • git submodule add ssh://git@github.com/microfarad-de/Nvm src/Nvm
  • git submodule add https://github.com/microfarad-de/Nvm 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://git@github.com/microfarad-de/TimerOne src/TimerOne
  • git submodule add ssh://git@github.com/microfarad-de/TimerTwo src/TimerTwo
  • git submodule add https://github.com/microfarad-de/TimerOne src/TimerOne
  • git submodule add https://github.com/microfarad-de/TimerTwo src/TimerTwo

Trace

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: https://github.com/microfarad-de/Trace

Git commands:

  • git submodule add ssh://git@github.com/microfarad-de/Trace src/Trace
  • git submodule add https://github.com/microfarad-de/Trace src/Trace
Last updated on March 19, 2020

Leave a Reply

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