Ramesh
Published © GPL3+

ESP8266 Covid-19 Widgets Live Tracker

Here to make an automatic Coronavirus COVID 19 Live Data Tracker using ESP8266 Web Server with widget. Data reporting in the webpage from W

IntermediateFull instructions provided1 hour469
ESP8266 Covid-19 Widgets Live Tracker

Things used in this project

Story

Read more

Schematics

covid_widgets_dofbot_l1IIEgtycd.png

Code

COVID.ino

Arduino
// required libraries
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ESPAsyncWebServer.h>


// Replace with your network credentials
const char* ssid = "SSID"; // your SSID
const char* password = "PW"; // your wifi password

// Create AsyncWebServer object on port 80
AsyncWebServer server(80);


const char index_html[] PROGMEM = R"rawliteral(
<!DOCTYPE HTML><html>
 
</head>
<body>
  <h2>ESP8266 Web Server for A Live COVID-19 Tracker</h2>

  <p>
    <script src="https://apps.elfsight.com/p/platform.js" defer></script>
<div class="elfsight-app-c8a11305-bbc2-46e8-aa5c-69d64833c204"></div>
    </P>
  <p>
    <i class="fab fa-youtube" style="font-size:1.0rem;color:red;"></i>
    <span style="font-size:1.0rem;">Subscribe to </span>
    <a href="https://www.youtube.com/channel/UCnIld2cZ8iAvoYZlMHWZrtA" target="_blank" style="font-size:1.0rem;">Dofbot YouTube Channel</a>
  </P>
</body>


</script>
</html>)rawliteral";



void setup(){
  // Serial port for debugging purposes
  Serial.begin(115200);

  
  // Connect to Wi-Fi
  WiFi.begin(ssid, password);
  Serial.println("Connecting to WiFi");
  while (WiFi.status() != WL_CONNECTED) {
    delay(1000);
    Serial.println(".");
  }

  // Print ESP8266 Local IP Address
  Serial.println(WiFi.localIP());

  // Route for root / web page
  server.on("/", HTTP_GET, [](AsyncWebServerRequest *request){
    request->send_P(200, "text/html", index_html);
  });
 

  // Start server
  server.begin();
}
 
void loop(){  

}

Credits

Ramesh
15 projects • 18 followers
Contact

Comments

Please log in or sign up to comment.