IoT - Modular - Supplimentary.cpp

From The TinkerNet Wiki
Revision as of 22:29, 29 April 2021 by Tinker (talk | contribs) (Created page with "==#includes, Defines, etc...== <syntaxhighlight lang="cpp" line="1"> #include "libraries.h" #include "functions.h" </syntaxhighlight> ==blinkLED()== <syntaxhighlight lang="...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

#includes, Defines, etc...

1 #include "libraries.h"
2 #include "functions.h"

blinkLED()

 1 void blinkLED(int speed) // Just a little function to blink the on-board LED for the beacon function.
 2 {
 3   // On most ESP8266-based modules, GPIO2 is connected to the
 4   // on-board LED (& it's inverted... so pulling this GPIO low
 5   // will turn on the on-board LED.
 6 
 7   digitalWrite(LED_BUILTIN, LOW);
 8   delay(speed);
 9   digitalWrite(LED_BUILTIN, HIGH);
10   delay(speed);
11 }