Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make formatting of Interrupt example compliant with examples_formatte…
…r.conf
  • Loading branch information
per1234 committed Sep 26, 2020
commit e1c89e57a1a54d724d8f7f3ebde89f599aa2a0d6
6 changes: 3 additions & 3 deletions examples/01.Basics/Interrupt/Interrupt.ino
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
const byte interruptPin = 2;
volatile byte state = LOW;

void blink () {
void blink() {
state = !state; // toggle the cached state
}

// the setup function runs once when you press reset or power the board
void setup () {
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
// initialize digital pin as input with pull-up resistor (i.e. always HIGH, unless deliberately pulled LOW)
Expand All @@ -38,7 +38,7 @@ void setup () {
}

// the loop function runs over and over again forever
void loop () {
void loop() {
// update the LED to reflect the cached state updated with interrupts
digitalWrite(LED_BUILTIN, state);
}
Expand Down