aboutsummaryrefslogtreecommitdiff
path: root/libraries/Bridge/examples/HttpClient/HttpClient.ino
blob: 4104ef44ae68662136555930d6f87b7b8eca7ffb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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);
}