mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
Run new astyle formatter against all the examples
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
/*
|
||||
Yun HTTP Client
|
||||
|
||||
This example for the Arduino Yún shows how create a basic
|
||||
HTTP client that connects to the internet and downloads
|
||||
content. In this case, you'll connect to the Arduino
|
||||
|
||||
This example for the Arduino Yún shows how create a basic
|
||||
HTTP client that connects to the internet and downloads
|
||||
content. In this case, you'll connect to the Arduino
|
||||
website and download a version of the logo as ASCII text.
|
||||
|
||||
created by Tom igoe
|
||||
@ -21,32 +21,32 @@
|
||||
void setup() {
|
||||
// Bridge takes about two seconds to start up
|
||||
// it can be helpful to use the on-board LED
|
||||
// as an indicator for when it has initialized
|
||||
// as an indicator for when it has initialized
|
||||
pinMode(13, OUTPUT);
|
||||
digitalWrite(13, LOW);
|
||||
Bridge.begin();
|
||||
digitalWrite(13, HIGH);
|
||||
|
||||
|
||||
Serial.begin(9600);
|
||||
|
||||
while(!Serial); // wait for a serial connection
|
||||
|
||||
while (!Serial); // wait for a serial connection
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// Initialize the client library
|
||||
HttpClient client;
|
||||
|
||||
|
||||
// Make a HTTP request:
|
||||
client.get("http://arduino.cc/asciilogo.txt");
|
||||
|
||||
// if there are incoming bytes available
|
||||
// from the server, read them and print them:
|
||||
|
||||
// if there are incoming bytes available
|
||||
// from the server, read them and print them:
|
||||
while (client.available()) {
|
||||
char c = client.read();
|
||||
Serial.print(c);
|
||||
}
|
||||
Serial.flush();
|
||||
|
||||
|
||||
delay(5000);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user