I’m working on a project with a Mega 2560 which reads a number of SHT71 temperature/humidity sensors. It also runs a web server so that the current values can be read from a browser. I’m also posting the values to sen.se on a regular basis.
So - the server code on the Arduino is getting more complex. I’m sending the HTML from the Arduino using println statements such as …
client.println(" Arduino Web Server <meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1”> ");
which, as the lines get longer is getting more and more tedious.
I’m actually developing the HTML code using Dreamweaver on a Mac and I’d love to run Ajax-type techniques from the Arduino - but the idea of copy/pasting the code from the Mac to Arduino and then going through the HTML and escaping all the quotes and so on is a bit daunting.
So, I’m wondering if anyone has any cunning ideas about how to “println” large chunks of character strings without worrying about them containing cr/lf, quotes, etc.?
I’ve thought of using a “println-safe” code obfuscator - but I doubt if such a beast exists.
Many thanks in advance for any ideas/help/pointers