mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-04 15:24:12 +01:00
24 lines
330 B
Arduino
24 lines
330 B
Arduino
|
|
||
|
#include <HttpClient.h>
|
||
|
|
||
|
void setup() {
|
||
|
pinMode(13, OUTPUT);
|
||
|
digitalWrite(13, LOW);
|
||
|
Bridge.begin();
|
||
|
}
|
||
|
|
||
|
void loop() {
|
||
|
HttpClient client;
|
||
|
client.get("http://my.server.address/file.php");
|
||
|
|
||
|
char c = client.read();
|
||
|
if (c=='1')
|
||
|
digitalWrite(13, HIGH);
|
||
|
if (c=='0')
|
||
|
digitalWrite(13, LOW);
|
||
|
|
||
|
delay(5000);
|
||
|
}
|
||
|
|
||
|
|