diff options
Diffstat (limited to 'libraries/Bridge/examples/HttpClient/HttpClient.ino')
-rw-r--r-- | libraries/Bridge/examples/HttpClient/HttpClient.ino | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/libraries/Bridge/examples/HttpClient/HttpClient.ino b/libraries/Bridge/examples/HttpClient/HttpClient.ino new file mode 100644 index 0000000..4104ef4 --- /dev/null +++ b/libraries/Bridge/examples/HttpClient/HttpClient.ino @@ -0,0 +1,26 @@ + +#include <Bridge.h> +#include <HttpClient.h> + +void setup() { + pinMode(13, OUTPUT); + digitalWrite(13, LOW); + Bridge.begin(); + Serial.begin(9600); + while(!Serial); +} + +void loop() { + HttpClient client; + client.get("http://arduino.cc/asciilogo.txt"); + + while (client.available()) { + char c = client.read(); + Serial.print(c); + } + Serial.flush(); + + delay(5000); +} + + |