Does anyone know how to send a number to a web server from the esp8266?
I am working on a project that will eventually do math with sensor data and send the resulting numbers from the esp8266 to a PC running Matlab for further analysis. I have been able to run the "Hello Server" example from the ESP8266EbServer library, and edited it to post numbers converted to a text string. However, Matlab acting as a client can only read number formats (uint_8, float, double, etc). It cannot read these from text and convert them. I have even had matlab ping the IP address of the ESP8266 and return an error message confirming that a connection was made but it could not read the numbers.
The key function call from handler in the "Hello Server" example is:
server.send(200, "text/plain", "hello from esp8266!");
From the comments in the ESP8266WebServer.h library file, I can see that the second argument is the HTTP content type code. I can find lists online of HTTP codes that list every file type I can think of, but not the code to just send a number. Actually, I will eventually need to send multiple numbers; at least 2, possibly 6. Sending doubles would be preferred, but I could make a float or int also work.
How can I adjust this function call to send number(s)?