General Purpose Input/Output (GPIO) library for Arduino
Clone or download
Latest commit 4a10057 Oct 20, 2017
Failed to load latest commit information.
examples Refactor examples Oct 14, 2017
src Cleanup Oct 14, 2017
.gitignore Refactoring Aug 31, 2017
Doxyfile Cleanup documentation Sep 13, 2017 Cleanup Oct 20, 2017 Cleanup Oct 3, 2017
mainpage.dox Cleanup Oct 3, 2017


The Arduino GPIO library has been developed to allow high performance digital pin access. Most access functions are compiled to a single instruction and execute in 1-2 clock cycles. The library functions are more than 10 times faster than the Arduino digital pin functions. In some cases as much as 100 times faster.

Additional support classes are available for Debounced Digital and Analog Pin, Shift Register Input/Output, and Software Serial. These also demonstrate how the GPIO template class may be used to construct additional libraries.

This library supports boards based on ATtinyX4, ATtinyX5, ATmega168, ATmega328P, ATmega32U4, ATmega1280, ATmega2560 and SAM3X8E.

Version: 1.11


Example Sketches

Benchmarks for ATtiny.


Wiring us GPIO us Xn (Due/Uno/Mega)
digitalRead 1.23/3.75/6.4 var = pin 0.0625/0.071 17/60/99
digitalWrite 2.30/4.25/7.2 pin = val 0.125/0.048 48/34/56
shiftIn 46/87/151 srpi >> var 4.8/4.6/4.6 9.6/19/32
shiftOut 53/104/161 srpo << val 5.7/7.9/7.9 9.3/13/20