//=============================================== // Buttons Library //=============================================== // Library #include "Button.h" // Making The Buttons Button btnRedOne(_btn_red_one); Button btnRedTwo(_btn_red_two); Button btnBlueOne(_btn_blue_one); Button btnBlueTwo(_btn_blue_two); //----------------------------------------------- // Functions //----------------------------------------------- void btn_start() { #ifdef ENA_BTN btnRedOne.begin(); btnRedTwo.begin(); btnBlueOne.begin(); btnBlueTwo.begin(); #endif } void btn_test() { #ifdef ENA_BTN while(1) { if(btnRedOne.pressed()) { Serial.println(" -> Red 1 Point"); } if(btnRedTwo.pressed()) { Serial.println(" -> Red 2 Point"); } if(btnBlueOne.pressed()) { Serial.println(" -> Blue 1 Point"); } if(btnBlueTwo.pressed()) { Serial.println(" -> Blue 2 Point"); } ESP.wdtFeed(); } #endif } //=============================================== // END //===============================================