mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-30 16:24:09 +03:00
Bridge library to the 1.5 format
This commit is contained in:
26
libraries/Bridge/examples/HttpClient/HttpClient.ino
Normal file
26
libraries/Bridge/examples/HttpClient/HttpClient.ino
Normal file
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user