wm-example-esp8266
Example using ESP8266 to send data to Wireless Monitor configured to monitor a Temperature sensor, Texas Instruments' LM35.
Getting Started
Edit your Wi-Fi configuration at:
const char* ssid = "";
const char* password = "";
Edit Wireless Monitor configuration. For that you need a server running.
Configuration with HTTPS support (Recommend):
const String host = "";
const int port = 443;
const String api_key = "";
const String monitor_key = "";
// change this with an actual fingerprint
String httpsFingerprint = "FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF";
Also you need to pass httpsFingerprint
as parameter to http.begin
function.
Where do I find the fingerprint?
On Google Chrome open Chrome DevTools (Ctrl + Shift + i
), click on Security tab >
View Certificate. The fingerprint is the SHA-1 Digital Signature.
Configuration with plain HTTP:
const String host = "";
const int port = 80;
const String api_key = "";
const String monitor_key = "";
Compiling and running in Arduino IDE
https://github.com/esp8266/Arduino#installing-with-boards-manager
Software Dependencies
After install Additional Board Manager all these dependencies will be available to download.
Hardware Dependencies
References
- https://github.com/esp8266/Arduino
- https://diyprojects.io/esp8266-web-client-tcp-ip-communication-examples-esp8266wifi-esp866httpclient
- https://techtutorialsx.com/2016/07/21/esp8266-post-requests
- https://bblanchon.github.io/ArduinoJson