mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-13 23:48:46 +01:00
645a57359e
Updated pretty-wifi-info-lua path in ShellCommands and WifiStatus examples Tried to make a sense of HttpClient example by making it fetch http://arduino.cc/asciilogo.txt
26 lines
361 B
C++
26 lines
361 B
C++
|
|
#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);
|
|
}
|
|
|
|
|