/********* 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 Logic
- Source Code compiled for: Arduino Uno
- Source Code created on: 2023-12-17 17:41:39
********* Pleasedontcode.com **********/
/****** SYSTEM REQUIREMENTS *****/
/****** SYSTEM REQUIREMENT 1 *****/
/* configurar a rede para identificar erros */
/****** END SYSTEM REQUIREMENTS *****/
/****** DEFINITION OF LIBRARIES *****/
#include
#include
/****** FUNCTION PROTOTYPES *****/
void setup(void);
void loop(void);
/***** DEFINITION OF DIGITAL INPUT PINS *****/
const uint8_t df_PushButton_PIN_D2 = 2;
/****** DEFINITION OF LIBRARIES CLASS INSTANCES*****/
EasyButton button(df_PushButton_PIN_D2);
/****** SYSTEM REQUIREMENTS *****/
/****** SYSTEM REQUIREMENT 1 *****/
/* configure the network for error detection */
void configureNetworkErrorDetection()
{
// Add code here to configure the network error detection
}
void setup(void)
{
// put your setup code here, to run once:
pinMode(df_PushButton_PIN_D2, INPUT_PULLUP);
// Initialize the button.
button.begin();
// Configure the network for error detection
configureNetworkErrorDetection();
}
void loop(void)
{
// put your main code here, to run repeatedly:
// Update the button state
button.read();
// Check if the button was pressed
if (button.isPressed())
{
// Button pressed logic here
}
}