Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
Update Blinky.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
cotestatnt authored Jul 14, 2021
1 parent 526b9da commit cb59515
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions examples/Blinky/Blinky.ino
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ const char *stateName[] = { "Blink 1", "Blink 2", "Blink 3"};
bool dummyBoolVar = false;
bool var = false;

void setup()
{
void setup() {
pinMode(button, INPUT_PULLUP);
pinMode(led, OUTPUT);
Serial.begin(115200);
Expand All @@ -35,8 +34,7 @@ void setup()
}


void loop()
{
void loop() {
// Update State Machine (true is state changed)
if(myFSM.Update()){
Serial.print(F("Active state: "));
Expand All @@ -58,7 +56,7 @@ void loop()


// Check button status, return true only on rising edge (oldButton == false)
bool checkButton(){
bool checkButton() {
static bool oldButton;
bool but = !digitalRead(button);
delay(40); // simple debounce button
Expand Down

0 comments on commit cb59515

Please sign in to comment.