Comments on: Build an ESP8266 Web Server – Code and Schematics (NodeMCU) https://randomnerdtutorials.com/esp8266-web-server/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Tue, 03 Dec 2024 11:45:02 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Sara Santos https://randomnerdtutorials.com/esp8266-web-server/#comment-988466 Tue, 03 Dec 2024 11:45:02 +0000 http://randomnerdtutorials.com/?p=5119#comment-988466 In reply to wu.

Hi.
I think this tutorial is what you’re looking for: https://randomnerdtutorials.com/esp32-esp8266-web-server-physical-button/
i hope this helps.
Regards,
Sara

]]>
By: wu https://randomnerdtutorials.com/esp8266-web-server/#comment-988246 Mon, 02 Dec 2024 13:30:53 +0000 http://randomnerdtutorials.com/?p=5119#comment-988246 Hello Sara , I want to connect an external button switch. In addition to the web server smart switch, I can also use an external button to turn on/off the LED. But I don’t know how to achieve it. I have tried it but all failed. Please help me thanks.

A Part of the code I modified is as follows:

const int buttonPin = 12;
int val;
pinMode(buttonPin, INPUT);

void loop()
{
……..

val=digitalRead(buttonPin);

if(val==HIGH)

{
delay(2000);
Serial.println("GPIO 14 ON");
client.println("<p><input type='submit' value='ON'></p>");
digitalWrite(G_LED, HIGH);
}

else

{
delay(2000);
Serial.println("GPIO 14 OFF");
client.println("<p><input type='submit' value='OFF'></p>");
digitalWrite(G_LED, LOW);

}

…….
}

]]>
By: wu https://randomnerdtutorials.com/esp8266-web-server/#comment-986383 Mon, 25 Nov 2024 11:48:14 +0000 http://randomnerdtutorials.com/?p=5119#comment-986383 hello, I want to connect an external button. When the button is pressed, ESP8266 WEB server ON changes to OFF. I tried to modify this part of the program code as follows:
But I still can’t use buttons to control the status of the webpage. Please help me how can I modify it. Thanks.

const int R_BTN=14;

void setup()
{
pinMode(R_BTN,INPUT_PULLUP);
.
.
}
.
.
.

val=digitalRead(R_BTN);

if (header.indexOf(“GET /5/on”) >= 0)
{
Serial.println(“GPIO 5 on”);
output5State = “on”;
digitalWrite(output5, HIGH);
}

if(val==LOW)
{
delay(200); //Delay button
output5State = “off”;
digitalWrite(output5, LOW);

}

/*
else if (header.indexOf(“GET /5/off”) >= 0)
{
Serial.println(“GPIO 5 off”);
output5State = “off”;
digitalWrite(output5, LOW);
}
*/

]]>
By: Sara Santos https://randomnerdtutorials.com/esp8266-web-server/#comment-982642 Tue, 12 Nov 2024 15:42:14 +0000 http://randomnerdtutorials.com/?p=5119#comment-982642 In reply to mubarak.

Hi.
What errors do you get?
Regards,
Sara

]]>
By: mubarak https://randomnerdtutorials.com/esp8266-web-server/#comment-982585 Tue, 12 Nov 2024 12:06:24 +0000 http://randomnerdtutorials.com/?p=5119#comment-982585 my ESP8266 is not connecting with wifi and i follow this toturial but i dont know why please help me

]]>
By: Sara Santos https://randomnerdtutorials.com/esp8266-web-server/#comment-902986 Wed, 03 Apr 2024 10:45:26 +0000 http://randomnerdtutorials.com/?p=5119#comment-902986 In reply to Sergio.

Hi.
Yes, it should be possible, but at the moment we don’t have that exact project.
Regards,
Sara

]]>
By: Sergio https://randomnerdtutorials.com/esp8266-web-server/#comment-902972 Wed, 03 Apr 2024 09:02:27 +0000 http://randomnerdtutorials.com/?p=5119#comment-902972 Hello. I tried the code in this page with my esp8266, and it works well.
Then I tried also the code for telegram notification, and it works also well.
Is it possible to merge them, so to have a (simple) web server, that in some case sends a telegram notification?
If not, is there a way to have this web server + another notification service?

Thanks
Sergio

]]>
By: Sergio https://randomnerdtutorials.com/esp8266-web-server/#comment-902839 Tue, 02 Apr 2024 16:05:12 +0000 http://randomnerdtutorials.com/?p=5119#comment-902839 Hello. I tried your codes for ESP8266 web server and for ESP8266 telegram, and both work, very good.
Is it possible to mix them? So to have a web server and if needed send a telegram notification?
I tried, but I cannot do this.
If not, is there a way to open a web server and send a notification in the same project, with another service?

Thank you very much
Sergio

]]>
By: Nachbauer Roman https://randomnerdtutorials.com/esp8266-web-server/#comment-825323 Wed, 15 Mar 2023 14:53:47 +0000 http://randomnerdtutorials.com/?p=5119#comment-825323 In reply to Sara Santos.

Hallo Sara
I have done it time bevor and onesmore now. –> Same result.
For test I have reduced the Baudrate to 9600 Baud –> then the printout is ok.

Is it a driver or a USB problem?

best regards from Austria
Roman Nachbauer

]]>
By: Sara Santos https://randomnerdtutorials.com/esp8266-web-server/#comment-825306 Wed, 15 Mar 2023 11:15:29 +0000 http://randomnerdtutorials.com/?p=5119#comment-825306 In reply to Nachbauer Roman.

Hi.
After uploading the code to the board, open the Serial monitor. Then, reset the board by pressing the RST button so that it starts running the code from the start.
When you open the Serial monitor, the board is probably already running the code, so you can’t see the first print statements.
Regards,
Sara

]]>