- Tue Dec 24, 2019 8:03 pm
#85040
12/24/2019
AsyncWebServer LibraryWhy should you care:
Using asynchronous network means that you can handle more than one connection at the same time
You are called once the request is ready and parsed
When you send the response, you are immediately ready to handle other connections while the server is taking care of sending the response in the background
Speed is OMG
Easy to use API, HTTP Basic and Digest MD5 Authentication (default), ChunkedResponse
Easily extendible to handle any type of content
Supports Continue 100
Async WebSocket plugin offering different locations without extra servers or ports
Async EventSource (Server-Sent Events) plugin to send events to the browser
URL Rewrite plugin for conditional and permanent url rewrites
ServeStatic plugin that supports cache, Last-Modified, default index and more
Simple template processing engine to handle templates
____________________________________________
There are six files in "Rain_Gauge_Two.zip:" index1.h, index2.h, index3.h, index4, variableInput.h, and Rain_Gauge_Two.ino. Unzip to folder on Desktop; double click "Rain_Gauge_Two.ino" after editing "variableInput.h" for you networking requirements/credentials. All files are required. Index files are "templates for web pages" and contain "Placeholders" referenced in sketched "processor" functions.
Online, Async Web Server version of "Rain_Gauge_Two" projectNote, there is a correction factor for Barometric Pressure in the "getWeatherData" function. Correction Factor Formula is: Relative Pressure (in millibars) equals Absolute Pressure (BME280, in millibars) plus (elevation in meters divided by 8.3).
"Rain_Gauge_Two.zip" is in previous POST
William