logo
首页技术栈工具库讨论
EasyButtonAtInt01

EasyButtonAtInt01

Small and easy to use Arduino library for using push buttons at INT0/pin2 and / or INT1/pin3 using interrupts.<br/>Functions for long and double press detection are included.<br/><br/>Just connect buttons between ground and pin 2 or 3 of your Arduino - that's it<br/><br/><b>No call</b> of begin() or polling function like update() required. No blocking debouncing delay.<br/>. <br/>Define an EasyButtonIn in you main program and use <i>ButtonStateIsActive</i> or <i>ButtonToggleState</i> to determine your action.<br/>Or use a <b>callback function</b> which will be called once on every button press or release.<br/><br/>Usage:<pre>#define USE_BUTTON_0<br/>#include "EasyButtonAtInt01.cpp.h"<br/>EasyButton Button0AtPin2;<br/><br/>void setup() {}<br/>void loop() {<br/>...<br/> digitalWrite(LED_BUILTIN, Button0AtPin2.ButtonToggleState);<br/>...<br/>}</pre><br/><br/>New: 2 sets of constructors.<br/>
由 
bruceshi2021-01-13 收录
--
推荐
不推荐
更多信息
PLATFORMIO
EasyButtonAtInt01
标签
根据用户添加的标签生成
暂无标签