/********* 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: "Arduino Control"
- Source Code compiled for: Arduino Mega
- Source Code created on: 2023-12-28 17:16:42
********* Pleasedontcode.com **********/
/****** SYSTEM REQUIREMENTS *****/
/****** SYSTEM REQUIREMENT 1 *****/
/* A digital control system is described by the */
/* difference equation y(n) = 0.5 y(n-2) – 0.5 */
/* y(n-4) + x(n) + x(n-2). (i) Determine the */
/* frequency response for the system. */
/****** END SYSTEM REQUIREMENTS *****/
/****** DEFINITION OF LIBRARIES *****/
#include
#include
/****** FUNCTION PROTOTYPES *****/
void setup(void);
void loop(void);
/***** DEFINITION OF DIGITAL INPUT PINS *****/
const uint8_t mybutton_PushButton_PIN_D2 = 2;
/****** DEFINITION OF LIBRARIES CLASS INSTANCES*****/
EasyButton myButton(mybutton_PushButton_PIN_D2);
/****** SYSTEM REQUIREMENTS *****/
/****** SYSTEM REQUIREMENT 1 *****/
/* A digital control system is described by the */
/* difference equation y(n) = 0.5 y(n-2) - 0.5 */
/* y(n-4) + x(n) + x(n-2). (i) Determine the */
/* frequency response for the system. */
/****** END SYSTEM REQUIREMENTS *****/
void setup(void)
{
// put your setup code here, to run once:
Serial.begin(9600);
myButton.begin();
}
void loop(void)
{
// put your main code here, to run repeatedly:
myButton.read();
if (myButton.isPressed())
{
Serial.println("Button has been pressed");
}
}