This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
const uint8_t LED_PIN = LED_BUILTIN; | |
const uint8_t BUTTON_PIN = 2; | |
const int LED_BLINK_DELAY = 1000; // ms, time of a single on or off, not the total | |
const int TOTAL_BLINKS = 5; // one blink means one on and one off, totalling 2 times LED_BLINK_DELAY | |
const int BUTTON_DEBOUNCE_DELAY = 50; // ms | |
volatile bool buttonState_interrupt; | |
unsigned long buttonDelayElapsed_interrupt = 0; |