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.

The Arduino libraries are stored under the following GitHub project:

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

After adding the required submodules to your project, you need to pull their library contents by executing the following commands:

  • git submodule init
  • git submodule update

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. By default, the IDE will compile all of 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. This library is being used in the Magnetic Loop Antenna and the Raspberry Pi UPS projects. Following are the main features:

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

GitHub repository: https://github.com/arduino-library/Adc

Git commands:

  • git submodule add ssh://git@github.com/arduino-library/Adc src/Adc
  • git submodule add https://github.com/arduino-library/Adc src/Adc

Button

This library implements the logic of push button control. This library is being used in the DCF77 Nixie Clock and the Magnetic Loop Antenna projects. Following are the main features:

  • Separate action triggers on rising and falling edges
  • Long button press detection
  • Eliminate contact bounce by averaging multiple samples

GitHub repository: https://github.com/arduino-library/Button

Git commands:

  • git submodule add ssh://git@github.com/arduino-library/Button src/Button
  • git submodule add https://github.com/arduino-library/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/arduino-library/Cli

Git commands:

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

  • Decoding of DCF77 time and date stamp
  • Triggering on rising or falling edge of an external pin interrupt
  • Plausibility checking of the decoded timestamp

GitHub repository: https://github.com/arduino-library/Dcf

Git commands:

  • git submodule add ssh://git@github.com/arduino-library/Dcf src/Dcf
  • git submodule add https://github.com/arduino-library/Dcf src/Dcf

Led

Library for controlling a blinking LED. This library has been used in the Magnetic Loop Antenna and Raspberry Pi UPS projects. It features:

  • Support for multiple LED objects
  • Adjustable on/off duration (duty cycle)
  • Adjustable finite number of blink cycles
  • Blocking and non-blocking execution modes

GitHub repository: https://github.com/arduino-library/Led

Git commands:

  • git submodule add ssh://git@github.com/arduino-library/Led src/Led
  • git submodule add https://github.com/arduino-library/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/arduino-library/LiCharger

Git commands:

  • git submodule add ssh://git@github.com/arduino-library/LiCharger src/LiCharger
  • git submodule add https://github.com/arduino-library/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/arduino-library/MathMf

Git commands:

  • git submodule add ssh://git@github.com/arduino-library/MathMf src/MathMf
  • git submodule add https://github.com/arduino-library/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/arduino-library/Nvm

Git commands:

  • git submodule add ssh://git@github.com/arduino-library/Nvm src/Nvm
  • git submodule add https://github.com/arduino-library/Nvm src/Nvm

TimerOne

This library provides a simple abstraction layer for the ATmega328p’s Timer/Counter 1. This library is used for setting the time base of the DCF77 Nixie Clock project.

GitHub repository: https://github.com/arduino-library/TimerOne

Git commands:

  • git submodule add ssh://git@github.com/arduino-library/TimerOne src/TimerOne
  • git submodule add https://github.com/arduino-library/TimerOne src/TimerOne

TimerTwo

This library provides a simple abstraction layer for the ATmega328p’s Timer/Counter 2. This library is used for setting the time base of the DCF77 Nixie Clock project.

GitHub repository: https://github.com/arduino-library/TimerTwo

Git commands:

  • git submodule add ssh://git@github.com/arduino-library/TimerTwo src/TimerTwo
  • git submodule add https://github.com/arduino-library/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/arduino-library/Trace

Git commands:

  • git submodule add ssh://git@github.com/arduino-library/Trace src/Trace
  • git submodule add https://github.com/arduino-library/Trace src/Trace

Last updated on July 14, 2023

Leave a Reply

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