In recent years, many of the bridges are monitored using non destructive testing methods. These methods are used for checking the structural damage, wreckage, strength of the bridges. To reduce the human losses, economic losses, protect the strength
Smart home system is very popular in current days that give many kind of application that make all simple and easy to control. In modern day, home machines are using wireless equipment and can be retrieved by internet that will make populations life
srs of traffic mgmtFull description
Book WIFIFull description
Uses Cases for IoT
Belajar Belajar IoT - Menyalakan Menyalakan dan Mematikan Mematikan Lampu Via Internet Internet Mengg...
Serial.begin(115200); // set Wifi SSID dan passwordnya WiFiMulti.addAP("SSID", "Password");
} void loop() { // tunggu koneksi Wifi if((WiFiMulti.run() == WL_CONNECTED)) { HTTPClient http; // ganti dengan URL API Last Feed punyamu sendiri
http.begin("http://agnosthings.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/field/last/feed/ // mulai koneksi dan ambil HTTP Header int httpCode = http.GET(); // httpCode akan bernilai negatif bila error if(httpCode > 0) { // cetak httpCode ke Serial Serial.printf("[HTTP] GET... code: %d\n", httpCode); // bila nilai dari server diterima if(httpCode == HTTP_CODE_OK) { // cetak string json dari server String json = http.getString();
#include #include ESP8266WiFiMulti WiFiMulti; // set variabel pin untuk lampu int lamp = LED_BUILTIN; void setup() {
Serial.begin(115200); // set Wifi SSID dan passwordnya WiFiMulti.addAP("SSID", "Password"); // set pin mode ke output pinMode(lamp, OUTPUT);
} void loop() { // tunggu koneksi Wifi if((WiFiMulti.run() == WL_CONNECTED)) { HTTPClient http; // ganti dengan URL API Last Feed punyamu sendiri
http.begin("http://agnosthings.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/field/last/feed/ // mulai koneksi dan ambil HTTP Header int httpCode = http.GET(); // httpCode akan bernilai negatif bila error if(httpCode > 0) { // cetak httpCode ke Serial Serial.printf("[HTTP] GET... code: %d\n", httpCode); // bila nilai dari server diterima if(httpCode == HTTP_CODE_OK) { // cetak string json dari server String json = http.getString();
Serial.println(json); // cek value json if(json == "{\"value\":\"1\",\"code\":200}"){ // set ke LOW untuk menyalakan digitalWrite(lamp, LOW); } else { // set ke HIGH untuk mematikan digitalWrite(lamp, HIGH); } } } else { Serial.printf("[HTTP] GET... failed, error: %s\n", http.errorToString(httpCode).c_st } // tutup koneksi HTTP
http.end(); }
12 f 18
15/03/2017 23 43
Belajar IoT - Menyalakan dan Mematikan Lampu Via Internet Mengg...