diff options
Diffstat (limited to 'libraries/Bridge/examples/HttpClient')
-rw-r--r-- | libraries/Bridge/examples/HttpClient/HttpClient.ino | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libraries/Bridge/examples/HttpClient/HttpClient.ino b/libraries/Bridge/examples/HttpClient/HttpClient.ino index bf5e8ff..5696bf0 100644 --- a/libraries/Bridge/examples/HttpClient/HttpClient.ino +++ b/libraries/Bridge/examples/HttpClient/HttpClient.ino @@ -5,17 +5,19 @@ void setup() { pinMode(13, OUTPUT); digitalWrite(13, LOW); Bridge.begin(); + Serial.begin(9600); + while(!Serial); } void loop() { HttpClient client; - client.get("http://my.server.address/file.php"); + client.get("http://arduino.cc/asciilogo.txt"); - char c = client.read(); - if (c=='1') - digitalWrite(13, HIGH); - if (c=='0') - digitalWrite(13, LOW); + while (client.available()) { + char c = client.read(); + Serial.print(c); + } + Serial.flush(); delay(5000); } |