By structuring the code so that there is a finite number of specific states the device can be in (router power on, router power off, and testing connection) and by defining exactly how and when the device switches between those states, operation and troubleshooting becomes a much more manageable job. It makes a great example of how to implement a simple event-driven finite state machine in a way that’s clear and concise. While the code for making this happen may sound trivial, nevertheless delves into documenting it. used a relay module that has built-in screw terminals and a socket for the ESP8266-01, so it looks like the whole device can be put together without soldering a thing. Then, after a delay, power is re-connected and all of one’s problems are over until the next time it happens. If Google cannot be reached, the board assumes a reboot is needed and disconnects the 12 V power supply from the router by using a relay. The device is an ESP8266 board configured to try to reach Google periodically via the local wireless network. The three-dollar router rebooter may be a simple device with only one job, but it’s well documented and worth a look. It’s a simple but inconvenient solution to a problem that shouldn’t exist, but that didn’t stop from automating it for a few bucks in parts. Sometimes connectivity problems go away by power cycling a router.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |