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
/** | |
* detect mutiple resets in order to trigger events using resets or power cycles alone | |
* reset board within resettimeout(5000ms) after boot and do so resetcnt(4) times | |
* has led indicator of reset window and serial output for better clarity | |
* | |
* This is blocking using a delay for timeout, can easily be changed to use a timer | |
* This is not wear leveled, but you could replace with spiffs(slower), or use a ring counter to level it | |
* You could also add a smaller window for reset by adding a pre-delay, to prevent reduce flash writes during glitchy or fast power cycles | |
* either way USE WITH CAUTION as you are writing twice every time your reset or repower the board, soft resets and wdt should not trigger this however. | |
* |
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
//************************************************************ | |
// this is a simple example that uses the easyMesh library | |
// | |
// 1. blinks led once for every node on the mesh | |
// 2. blink cycle repeats every BLINK_PERIOD | |
// 3. sends a silly message to every node on the mesh at a random time betweew 1 and 5 seconds | |
// 4. prints anything it recieves to Serial.print | |
// | |
// | |
//************************************************************ |
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
/* | |
* ESP8266 Web server with Web Socket to control an LED. | |
* | |
* The web server keeps all clients' LED status up to date and any client may | |
* turn the LED on or off. | |
* | |
* For example, clientA connects and turns the LED on. This changes the word | |
* "LED" on the web page to the color red. When clientB connects, the word | |
* "LED" will be red since the server knows the LED is on. When clientB turns | |
* the LED off, the word LED changes color to black on clientA and clientB web |