Re: How can I pass a value from Arduino C To HTML?
Posted: Mon Aug 06, 2018 2:23 pm
Hi Herbie,
I am pleased that you are now seeing the temperature displayed on your web page. The function server.send_P is for when you have pointers to 'char' arrays.
I don't have much expertise in this area, but I see the constructor for your server object can also take two parameters: an IP address (as a IPAddress object) and a port (as an 'int' variable).
So try something like this (placing the #include near the top of your code):
You will find code of IPAddress.h, IPAddress.cpp, ESP8266WebServer.h and ESP8266WebServer.cpp on GitHub.
If my suggestion does not work and nobody else steps in to help, I suggest you start a new forum thread.
I am pleased that you are now seeing the temperature displayed on your web page. The function server.send_P is for when you have pointers to 'char' arrays.
I don't have much expertise in this area, but I see the constructor for your server object can also take two parameters: an IP address (as a IPAddress object) and a port (as an 'int' variable).
So try something like this (placing the #include near the top of your code):
Code: Select all
#include <IPAddress.h>
IPAddress a(192,168,1,20); // create IPAddress object
ESP8266WebServer server(a,80); // create server object with IP address and port
If my suggestion does not work and nobody else steps in to help, I suggest you start a new forum thread.