Skip to content

Commit

Permalink
Change baudrate and document clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Evert Arias committed Apr 11, 2020
1 parent 7415481 commit 3db0316
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions examples/MultipleSequence/MultipleSequence.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
#include <Arduino.h>
#include <EasyButton.h>

// Arduino pin where the button is connected to.
#define BUTTON_PIN 16
#define BAUDRATE 19200

#define BAUDRATE 115200

void sequenceEllapsed()
{
Expand All @@ -21,18 +23,25 @@ void otherSequence()
Serial.println("Other sequence");
}

// Instance of the button.
EasyButton button(BUTTON_PIN);

void setup() {
// put your setup code here, to run once:
void setup()
{
// Initialize Serial for debuging purposes.
Serial.begin(BAUDRATE);
// Initialize the button.
button.begin();

button.onSequence(2, 1500, sequenceEllapsed);

button.onSequence(3, 2500, otherSequence);

Serial.println("Multiple onSequence example");
}

void loop() {
// put your main code here, to run repeatedly:
void loop()
{
// Continuously read the status of the button.
button.read();
}

0 comments on commit 3db0316

Please sign in to comment.