ESP8266 Webserver Project

Moderator: Sprite_tm

User avatar
By kendralz
#88790 Hi good day to all and please welcome me to this forum

I just wanna ask on How to to send int value to html asyncwebserver

Here's my sample code

Code: Select all#include <ESPAsyncTCP.h>
#include <ESPAsyncWebServer.h>

int btnCount=0;

const char index_html[] PROGMEM = R"rawliteral(


void ICACHE_RAM_ATTR btnPush()
   btnCount ++;


void setup () {

attachInterrupt(D6, btnPush, RISING);
pinMode(D6, INPUT);

server.on("/", HTTP_GET, [](AsyncWebServerRequest *request){
    request->send_P(200, "text/html", index_html, processor);



void loop {


All i want to do is when i press the pushbutton "btnCount" will appear on html webserver

Hope you help me w/ this thank you MORE POWER