web iot espressif

Dependencies:   WIZWebtInterface mbed

Revision:
3:dc786e394e82
Child:
4:f975091219a2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wizHTML.h	Wed Nov 16 05:25:55 2016 +0000
@@ -0,0 +1,78 @@
+static char ledSc[4][7] = {"open.", "FF0000", "close", "000000"};
+static char html[3072]={0};
+void htmlWeb(int Temp,int tempW,int Hum,int humW,int Gas,float gasW,char* Led,char* ledS,char* ip)
+{
+    sprintf(html, "<!DOCTYPE html PUBLIC '-//DTD HTML 4.01//EN' 'http://www.dfrobot.com.cn'>\
+        <html>\
+        <body bgcolor='#cccc99'></body>\
+        <head><title>Hi DFrobot</title></head>\
+        <h1>W7500P Data Monitor</h1>\
+        <hr style='width: 300; height: 2px;'>\
+        \
+        <table style='width: 500px; height: 30px;' border='1' cellpadding='2' cellspacing='2'>\
+        <tbody>\
+        <tr>\
+        <td style='font-family: Verdana; font-weight: bold; font-style: italic; background-color: rgb(100, 100, 255); text-align: center;'><small>\
+        <span style='color: white;'>Data&Control\
+        </span></small></td>\
+        </tr>\
+        </tbody>\
+        </table>\
+        \
+        <tbody>\
+        <table bgcolor='#cccccc' border='1' cellpadding='0' cellspacing='0' width='500' height='22';>Temperature:%d Celsius\
+        <tbody><tr><td>\
+        <table border='0' cellpadding='0' cellspacing='0' width='%d'>\
+        <td bgcolor='#33ff00'>&nbsp;\
+        </td></tr></tbody>\
+        </table>\
+        </tbody>\
+        \
+        <tbody>\
+        <table bgcolor='#cccccc' border='1' cellpadding='0' cellspacing='0' width='500' height='22';><p></p>Humidity:%d%%\
+        <tbody><tr><td>\
+        <table border='0' cellpadding='0' cellspacing='0' width='%d'>\
+        <td bgcolor='#33ff00'>&nbsp;\
+        </td></tr></tbody>\
+        </table>\
+        </tbody>\
+        \
+        <tbody>\
+        <table bgcolor='#cccccc' border='1' cellpadding='0' cellspacing='0' width='500' height='22';><p></p>Gas Value:%d\
+        <tbody><tr><td>\
+        <table border='0' cellpadding='0' cellspacing='0' width='%.0f'>\
+        <td bgcolor='#33ff00'>&nbsp;\
+        </td></tr></tbody>\
+        </table>\
+        </tbody>\
+        \
+        <tbody>\
+        <table bgcolor='#cccccc' border='1' cellpadding='0' cellspacing='0' height='20';><p></p>Led state:%s\
+        <tbody><tr><td>\
+        <table border='0' cellpadding='0' cellspacing='0' width='115'>\
+        <td bgcolor='#%s'>&nbsp;\
+        </td></tr></tbody>\
+        </table>\
+        </tbody>\
+        \
+        <tbody>\
+        <table border='0' width='600'>\
+        <tbody><tr>\
+        <td width='0'></td>\
+        <hr />\
+        </tr></tbody>\
+        </table>\
+        </tbody>\
+        \
+        <tbody>\
+        <table style='width: 130px; color: #873422; height: 30px;'>\
+        <tbody><tr>\
+        <td ><big><big><font size='-1'><big><big><strong>LED control</font></big></big></td>\
+        </tr></tbody>\
+        </table>\
+        \
+        <form action='http://%s'><H3>Led:<input type='submit' value='ON/OFF'><H3></form>\
+        </tbody>\
+        <meta http-equiv='refresh' content='2'>\
+        </html>\0", Temp, tempW, Hum, humW, Gas, gasW, Led, ledS, ip);
+}
\ No newline at end of file