0
HTTP 메시지를 받았을 때 Arduino를 비교하고 싶습니다. 모든 요청을 볼 수 있습니다. 끝 부분에 'hello'코드를 저장하고 'hello'와 같은 코드를 실행하면 어떻게 할 수 있습니까?Arduino save http 변수
char buffer;
while (client.connected()) {
while (client.available()) {
buffer = client.read();
Serial.print(buffer);
}}
Serial.println("Closing connection");
Serial.println("");
client.close();
시리얼 모니터 :
Connect to 192.168.2.101:80
Connected & Data sent
TTP/1.1 200 OK
Date: Sun, 30 Mar 2014 20:27:43 GMT
Server: Apache/2.2.25 (Win32) mod_ssl/2.2.25 OpenSSL/0.9.8y
X-Powered-By: ZendServer 6.3.0
Set-Cookie: ZDEDebuggerPresent=php,phtml,php3; path=/
Connection: close
Content-Type: text/html
helloClosing connection
난 당신의 코드를 시도하지만, 아무것도 같이 ... 시리얼 모니터에 표시됩니다 : 연결 및 데이터 가 읽혀질 전송 : 뭔가 similat에 uhmm, \ r을 제거하려고 ... – milhas
을 어쩌면 (그래서 EQ가 2 인 경우 줄이거 나 strlen (무엇)으로 바꿔서 더 이상 신경 쓸 필요없이 무엇을 바꿀 수 있습니까 :) – Lesto
나는 정말로 당신이 무슨 뜻인지 모르겠다. 나는 제거하고, eq로 바꾼다. 2, 아무것도 작동하지 ... 나는 이것을 발견 : if (result.endsWith ("hello")) { Serial.print ("hello from php"); 그리고 그것은 작동 중입니다 ... – milhas