web iot espressif

Dependencies:   WIZWebtInterface mbed

wizHTML.h

Committer:
846354866
Date:
2016-11-16
Revision:
4:f975091219a2
Parent:
3:dc786e394e82

File content as of revision 4:f975091219a2:

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>", Temp, tempW, Hum, humW, Gas, gasW, Led, ledS, ip);
}