Closed rickmor10 closed 7 years ago
#include <RBD_Timer.h>
#include <RBD_Button.h>
RBD::Button buttonA(2); // input_pullup by default
RBD::Button buttonB(3); // input_pullup by default
void setup() {
Serial.begin(115200);
}
void loop() {
if(buttonA.onPressed()) {
Serial.println("Button A Pressed");
}
if(buttonA.onReleased()) {
Serial.println("Button A Released");
}
if(buttonB.onPressed()) {
Serial.println("Button B Pressed");
}
if(buttonB.onReleased()) {
Serial.println("Button B Released");
}
}
Hi, this seems like just what I have been looking for, great work. Can you please tell me if there are any provisions for using multiple buttons, and if so how to implement this when coding.
Thanks.