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
/**************************** | |
The MIT License (MIT) | |
Copyright (c) 2015 by [email protected] | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
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 |
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
/* | |
* Demonstrate using an http server and HTML href to control an LED. | |
* The http server runs on the ESP8266. | |
* | |
* Connect to "http://esp8266HrefControl.local" or "http://<IP address>" | |
* to bring up an HTML page to control the LED connected GPIO#0. This works | |
* for the Adafruit ESP8266 HUZZAH but the LED may be on a different pin on | |
* other breakout boards. | |
* | |
* Imperatives to turn the LED on/off using a non-browser http client. |
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
/* | |
* Demonstrate using an http server and an HTML form to control an LED. | |
* The http server runs on the ESP8266. | |
* | |
* Connect to "http://esp8266WebForm.local" or "http://<IP address>" | |
* to bring up an HTML form to control the LED connected GPIO#0. This works | |
* for the Adafruit ESP8266 HUZZAH but the LED may be on a different pin on | |
* other breakout boards. | |
* | |
* Imperatives to turn the LED on/off using a non-browser http client. |
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
/* | |
* Vibration switch demo for ESP8266 | |
* | |
* Blink the LED and print debug info when the | |
* switch makes/breaks contact. | |
* | |
* The switch is connected between GPIO#2 and GND. The | |
* switch is open when still and closes briefly when | |
* shocked/vibrated. In fact, it closes and opens | |
* many times very quickly. |
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
/* | |
Basic MQTT example modified for ESP8266 WiFi | |
- connects to an MQTT server | |
- publishes "hello world" to the topic "outTopic" | |
- subscribes to the topic "inTopic" | |
Arduino IDE 1.6.4 | |
ESP8266 1.6.4-673-g8cd3697 | |
MQTT client library from |