/********* 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: "Pin Setup"
- Source Code compiled for: Arduino Nano ESP32
- Source Code created on: 2024-01-14 12:37:59
********* Pleasedontcode.com **********/
/****** SYSTEM REQUIREMENTS *****/
/****** SYSTEM REQUIREMENT 1 *****/
/* do nothing */
/****** END SYSTEM REQUIREMENTS *****/
/****** DEFINITION OF LIBRARIES *****/
#include
#include
/****** FUNCTION PROTOTYPES *****/
void setup(void);
void loop(void);
/***** DEFINITION OF DIGITAL INPUT PINS *****/
const uint8_t button_PushButton_PIN_D2 = 2;
/***** DEFINITION OF ANALOG INPUT PINS *****/
const uint8_t anhighimped_PIN_A0 = A0;
const uint8_t anpullup_PIN_A1 = A1;
const uint8_t anpulldown_PIN_A2 = A2;
/****** DEFINITION OF LIBRARY CLASS INSTANCES *****/
EasyButton button(button_PushButton_PIN_D2);
void onPressed()
{
// Implement the action to be performed when the button is pressed
}
void setup(void)
{
// put your setup code here, to run once:
pinMode(button_PushButton_PIN_D2, INPUT_PULLUP);
pinMode(anhighimped_PIN_A0, INPUT);
pinMode(anpullup_PIN_A1, INPUT_PULLUP);
pinMode(anpulldown_PIN_A2, INPUT_PULLDOWN);
// Set the onPress callback function
button.onPressed(onPressed);
}
void loop(void)
{
// put your main code here, to run repeatedly:
button.read(); // Read the state of the button
// Your code for system requirements can be implemented here, if required.
}