/********* Pleasedontcode.com **********
Pleasedontcode thanks you for automatic code generation! Enjoy your code!
- Terms and Conditions:
You have a non-exclusive, revocable, worldwide, royalty-free license
for personal and commercial use. Attribution is optional; modifications
are allowed, but you're responsible for code maintenance. We're not
liable for any loss or damage. For full terms,
please visit pleasedontcode.com/termsandconditions.
- Project: Button Activation
- Source Code compiled for: Arduino Pro Mini 3.3V
- Source Code created on: 2023-12-27 07:06:38
********* Pleasedontcode.com **********/
/****** SYSTEM REQUIREMENTS *****/
/****** SYSTEM REQUIREMENT 1 *****/
/* 111111111111 */
/****** END SYSTEM REQUIREMENTS *****/
/****** DEFINITION OF LIBRARIES *****/
#include
#include
/****** FUNCTION PROTOTYPES *****/
void setup(void);
void loop(void);
void onPressed(void);
/***** DEFINITION OF DIGITAL INPUT PINS *****/
const uint8_t button_PushButton_PIN_D2 = 2;
/****** DEFINITION OF LIBRARY CLASS INSTANCES*****/
EasyButton button(button_PushButton_PIN_D2);
void setup(void)
{
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println();
Serial.println(">>> EasyButton pressed example <<<");
button.begin();
button.onPressed(onPressed);
}
void loop(void)
{
// put your main code here, to run repeatedly:
button.read();
/****** SYSTEM REQUIREMENTS *****/
/****** SYSTEM REQUIREMENT 1 *****/
// Code implementation for System Requirement 1
/****** END SYSTEM REQUIREMENTS *****/
}
void onPressed(void)
{
Serial.println("Button pressed");
}