私は次のコードを持っています:
char page[] PROGMEM =
"HTTP/1.0 503 Service Unavailable\r\n"
"Content-Type: text/html\r\n"
"Retry-After: 600\r\n"
"\r\n"
"<html>"
"<head><title>"
"DeckTone Server"
"</title></head>"
"<body>"
"<h3>Start page</h3>"
"<p>"
"Arduino UNO .<br />"
"Autor: DeckTone."
"</p>"
"</body>"
"</html>"
;
そして私は次の整数を持っています:
int a=2;
arduinoのWebサーバー上の私の文字は、次のコードを提供しています:
if (ether.packetLoop(ether.packetReceive())) {
memcpy_P(ether.tcpOffset(), page, sizeof page);
ether.httpServerReply(sizeof page - 1);
memcpy_P(ether.tcpOffset(), page2, sizeof page2);
ether.httpServerReply(sizeof page2 - 1);
}
次の整数a(将来的には他の変数も)をcharに追加して、次のコードがこのページのcharに含まれる整数を投稿するようにします。私のcharの例は非常に役に立ちます。
ご協力いただきありがとうございます。