if (client)
{
while (client.connected())
{
if (client.available())
{
char c = client.read();
//read char by char HTTP request
if (readString.length() < 30)
{
//store characters to string
readString += c;
}//end if (readString.length() < 30)
//output chars to serial port
//Serial.print(c);
//if HTTP request has ended
if (c == '\n')
{
// now output HTML data starting with standart header
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println();
client.print("<body>");
//想show在網頁上的寫在這---start----
client.println("<h1>HTTP test routines</h1>");
//想show在網頁上的寫在這---end----
client.println("</body></html>");
//clearing string for next read
readString="";
//stopping client
client.stop();
}//end if (c == '\n')
}//end if (client.available())
}//end while (client.connected())
}//end if (client)
}作者: mzw2008 時間: 2012-1-11 23:14
那這樣我更懷疑9V供電是壞的了