// Exercise 04: Toggling an LED using a Push Button on Arduino
// Objective: Connect a push button to an Arduino and create a program that toggles
// the state of a built-in LED each time the button is pressed.
//
// the challange is to debounce the signal.
//
// raw push button signal when being pushed:
//
// button pushed │ ┌┐┌┐┌──────────┐┌┐┌┐ ┌┐┌┐┌──────────┐┌┐┌┐
// │ │││││ │││││ │││││ │││││
// button released │ ─────┘└┘└┘ └┘└┘└───────────┘└┘└┘ └┘└┘└──────
// └───────────────────────────────────────────────────────────────────────
// time
//
// expected result:
//
// LED ON │ ┌──────────────────────────────┐
// │ │ │
// LED OFF │ ─────┘ └───────────────────────────
// └────────────────────────────────────────────────────────────────────────
// time
//
// Resources:
// millis: https://www.arduino.cc/reference/en/language/functions/time/millis/
void setup() {
// Initialization:
// Set up the button and LED pins as inputs and outputs respectively.
// Also, initialize any required variables.
}
void loop() {
// Main code:
// Read the state of the button and determine if it has been pressed.
// If the button is pressed, toggle the state of the LED (on to off, or off to on).
}