不好意思,沒有說很明白我是要
1.只要曾經温度過高,就要轉址
可否再請教一個問題,我有照您說的在網頁自動更新的能是有成功,那可加上變數嗎,因為想把變數帶到下一個頁面裡 但不管我用什麼方式串,他檢查時都說語法錯誤
if(pos) {
int val = DHT11.read(DHT11PIN);
int sss;
sss = micVal;
BufferFiller bfill = ether.tcpOffset();
bfill.emit_p(PSTR("HTTP/1.0 200 OK\r\nContent-Type: text/html\r\nPragma: no-cache\r\n\r\n"));
if(sss>26){
bfill.emit_p(PSTR(" <meta http-equiv='refresh' content='5; url=http://111.111.111.111?ID=變數>"));
}else{
bfill.emit_p(PSTR(" <meta http-equiv='refresh' content='5; url=http://222.222.222.222>"));
}
bfill.emit_p(PSTR("<p><h1>感測值</h1></p> "));
bfill.emit_p(PSTR("<p><h2>等於: </h2></p> "));
bfill.emit_p(PSTR("$D\n"), sss);
ether.httpServerReply(bfill.position());
}
|