4

I found another way to include a literal file (html, css, or other) and assign it to a constant string without resorting to make files: Add one line of code on top of your html (css, js, etc) file, and another at the bottom, and save it with an extra .h extension. Then include that file in de Arduino IDE. This could easily be done by a (manually executed) ...


3

Of course, as soon as I linked that WiFi Manager library in my question, I figured it out. The term I was missing was "captive portal" and I was able to figure it out from there. But I decided to post the question anyways, since it might help someone else stuck in the same situation. Here's my understanding of how it works: when your device ...


3

It looks like you forgot to initialize switchPin1 to be an output. Add the following to your setup() (for example, right after the corresponding initialization commands for switchPin0): void setup() { .... pinMode(switchPin1, OUTPUT); digitalWrite(switchPin1, HIGH); .... }


3

I have a domain. Congratulations. It is hosted by GoDaddy. You have my deepest sympathies. I need to connect that server and receive some data by executing PHP files. I am not sure about the components. Tutorials on internet describes how to control esp8266 from web server which is i do not want. "Controlling" an ESP8266 from a web server is ...


2

Yes, and it's not too hard, but do you do need to do string parsing in C to achieve it. In your code you read the header of the HTTP request byte by byte and send it to serial, essentially discarding it. Instead you need to read the header line by line (at least the first line) and parse the URL parameters. The format of the first line should be something ...


2

You have: server.on("/", handleRoot); server.on("/test.svg", drawGraph); server.on("/",HTTP_POST,response); The first call using handleRoot species no particular method, and in this case it seems any method is acceptable. You later specify server.on("/",HTTP_POST,response); specifically for POST requests. These are ...


2

If you want to send data to a server on the internet, you will need an internet connection, or at least a connection to a internet gateway. Which type of connection you use, and how you set up that connection, depends on distance, speed, and coverage you need. Probably the most universal for your application, in the sense that it will work wherever a phone ...


1

In your sketch DNS IP parameter is missing in Ethernet.begin. It should be Ethernet.begin(mac, ip, dns, gateway, subnet);


1

Macro Conflict You have two basic problems here. The more significant one is that your use of SERVER_H in your include guard: #ifndef WEBSERVER_H #define WEBSERVER_H conflicts with a usage in ESPAsyncWebServer.h: #ifndef WEBSERVER_H typedef enum { HTTP_GET = 0b00000001, HTTP_POST = 0b00000010, HTTP_DELETE = 0b00000100, HTTP_PUT = ...


1

Please check the readme: https://github.com/me-no-dev/ESPAsyncWebServer#send-large-webpage-from-progmem You probably have to declare it in progmem without rawliteral. const​ ​char​ index_html[] PROGMEM = ​"​...​"​; ​//​ large char array, tested with 14k​ request->​send_P​(​200​, ​"​text/html​"​, index_html);


1

After testing the server on the host machine using an additional computer, I was able to produce the desired output. I would suspect it is an issue within the library or mis-use/understanding. I found a post that suggested the library was the problem and ended up using this library instead. Using the example implementation , I was able to achieve the desired ...


1

An Arduino Uno doesn't have a Real Time Clock, but you could contact a NTP time server on the internet using the WiFi shield you mention, and get the time from there, and then keep track of time using millis(). Every so often, you should adjust the time with a new call to the NTP time server, because the Arduino's clock isn't all that accurate. The easiest ...


1

So, I found the solution. It was a very simple mistake. The NodeMCU IP is not the same as the Computer IP that the server was running on. I changed the localhost string with the IP of my pc, and it worked perfectly fine.


Only top voted, non community-wiki answers of a minimum length are eligible