EasyButtonAtInt01

Small and easy to use Arduino library for using push buttons at INT0 and / or INT1 pin (pin 2 / 3) using interrupts.No call of begin() or update() function needed. No blocking debouncing.

Author
Armin Joachimsmeyer
Website
https://github.com/ArminJo/EasyButtonAtInt01
Category
Signal Input/Output
License
GPL 3.0
Library Type
Contributed
Architectures
avr

Just connect buttons between ground and pin 2 or 3 of your Arduino - thats it.<br/><br/>In you main program define an EasyButton and use <i>ButtonStateIsActive</i> or <i>ButtonToggleState</i> to determine your action.<br/>Or use a callback function which will be called once on every button press.<br/><br/>Usage:<pre>#define USE_BUTTON_0<br/>#include "EasyButtonAtInt01.h"<br/>EasyButton Button0AtPin2(true);<br/><br/>void setup() {}<br/>void loop() {<br/>...<br/> digitalWrite(LED_BUILTIN, Button0AtPin2.ButtonToggleState);<br/>...<br/>}</pre><br/>If button timing is of interest, 3 variables are available:<ul><li>ButtonPressDurationMillis</li><li>ButtonLastChangeMillis</li><li>ButtonReleaseMillis</li></ul>

Downloads

Filename Release Date File Size
EasyButtonAtInt01-1.0.0.zip 2019-03-26 25.12 KiB