Hi All,
I am trying to build a web interface to one of my projects running on an Arduino Mega. I had found Arduino Playground - WebServer and liked the structure because it provides for multiple pages allowing the separation of different levels of Running information and setup information.
I have come across an issue when modifying it for my needs. I am trying to setup the web page to display sensor data but am having issues with inserting the variables into the progmem char value.
This is an example of the section of code I am trying to modify. For the full sketch of the web server see: Arduino Playground - WebServer
// Page 2
PROGMEM prog_char http_uri2[] = "/page2";
PROGMEM prog_char content_title2[] = "<h2>Page 2</h2>";
PROGMEM prog_char content_page2[] = "<hr /><h3>Content of Page 2</h3><p>Nothing here.</p>";
I have been able to modify the Title, and Headings with out issue. Where I have stumbled is in changing "
Nothing here.
" to suit my needs. I have a series of values showing operation time and operation mode and am trying to display there values here. I have tried numerous ways of modifying this line of code to include the needed values. The Ideal output would look like "Current Run Time: intRT Total Run Time: intRT_T Operation Mode: intMode
". intMode,intRT, and intRT_T are the variables I am trying to access.Can anyone help shed some light on how I would go about doing this or a better method for it?
Thanks
Chris