{"id":791,"date":"2020-03-17T11:26:01","date_gmt":"2020-03-17T04:26:01","guid":{"rendered":"http:\/\/wiki.rdd-tech.com\/?post_type=ht_kb&#038;p=791"},"modified":"2020-08-23T11:16:23","modified_gmt":"2020-08-23T04:16:23","slug":"pengenalan-iot-write-dan-read-data-ke-web-local","status":"publish","type":"ht_kb","link":"https:\/\/wiki.rdd-tech.com\/index.php\/knowledge-base\/pengenalan-iot-write-dan-read-data-ke-web-local\/","title":{"rendered":"Pengenalan IoT : Arduino Simple Web Server"},"content":{"rendered":"\n<p>Setelah mencoba<em> search<\/em> and <em>connect<\/em>. Pada thread ini kita akan mencoba memasukan data (input) ke dalam jejaring lokal <em>(local web<\/em>). <em>Web<\/em> lokal ini bersifat LAN, sehingga komputer atau perangkat yang terkoneksi pada jaringan ini dapat melihat datanya.<\/p>\n\n\n\n<h3 id=\"1-write-to-local-web\" >1. Write to Local Web<\/h3>\n\n\n\n<p>Arduino MKR1000 ini dapat bertindak sebagai web server , dengan web server sederhana, kit adapat menampilkan data-data dari sensor pada sebuah local website. Berikut ini contoh program untuk menampilkan data temperature pada sebuah website sederhana:<\/p>\n\n\n\n<div class=\"wp-block-file\"><a href=\"https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/03\/Latihan_Simple_WebServer_2.zip\">Latihan_Simple_WebServer_2<\/a><a href=\"https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/03\/Latihan_Simple_WebServer_2.zip\" class=\"wp-block-file__button\" download>Download<\/a><\/div>\n\n\n\n<p>Program diatas memerintahkan mikrokontroler untuk membaca suhu dan menguploadnya ke <em>local web<\/em>. Dibawah ini merupakan video hasilnya.<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"http:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/02\/V_20200203_144824_vHDR_Auto21.mp4\"><\/video><figcaption>Video write ke local web<\/figcaption><\/figure>\n\n\n\n<h3 id=\"2-read-from-local-web\" >2. Read from Local Web<\/h3>\n\n\n\n<p>Selain menulis MKR1000 ini bisa juga membaca data yang di-<em>input<\/em> dari <em>web<\/em> Misalnya kita ingin menyalakan sebuah lampu dari website. Berikut contoh program untuk menyalakan 3 buah lampu led dengan masing-masing tombol yang berbeda<\/p>\n\n\n\n<div class=\"wp-block-file\"><a href=\"https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/03\/Latihan_Simple_WebServer_3.zip\">Latihan_Simple_WebServer_3<\/a><a href=\"https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/03\/Latihan_Simple_WebServer_3.zip\" class=\"wp-block-file__button\" download>Download<\/a><\/div>\n\n\n\n<p> Program diatas memerintahkan mikrokontroler untuk membaca <em>state <\/em>(<em>on<\/em>\/<em>off<\/em>) tiap-tiap LED yang telah dimasukan oleh pengguna ke <em>web<\/em>. Dibawah ini merupakan video hasilnya.<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"http:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/02\/Untitled-Project-\u2010-Made-with-Clipchamp-2.mp4\"><\/video><\/figure>\n\n\n\n<div class=\"wp-block-file\"><a href=\"https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/03\/Latihan_Simple_WebServer.zip\">Latihan_Simple_WebServer<\/a><a href=\"https:\/\/wiki.rdd-tech.com\/wp-content\/uploads\/2020\/03\/Latihan_Simple_WebServer.zip\" class=\"wp-block-file__button\" download>Download<\/a><\/div>\n","protected":false},"author":4,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0},"ht_kb_category":[10],"ht_kb_tag":[24,45,31,44],"_links":{"self":[{"href":"https:\/\/wiki.rdd-tech.com\/index.php\/wp-json\/wp\/v2\/ht_kb\/791"}],"collection":[{"href":"https:\/\/wiki.rdd-tech.com\/index.php\/wp-json\/wp\/v2\/ht_kb"}],"about":[{"href":"https:\/\/wiki.rdd-tech.com\/index.php\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/wiki.rdd-tech.com\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/wiki.rdd-tech.com\/index.php\/wp-json\/wp\/v2\/comments?post=791"}],"version-history":[{"count":22,"href":"https:\/\/wiki.rdd-tech.com\/index.php\/wp-json\/wp\/v2\/ht_kb\/791\/revisions"}],"predecessor-version":[{"id":1440,"href":"https:\/\/wiki.rdd-tech.com\/index.php\/wp-json\/wp\/v2\/ht_kb\/791\/revisions\/1440"}],"wp:attachment":[{"href":"https:\/\/wiki.rdd-tech.com\/index.php\/wp-json\/wp\/v2\/media?parent=791"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/wiki.rdd-tech.com\/index.php\/wp-json\/wp\/v2\/ht_kb_category?post=791"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/wiki.rdd-tech.com\/index.php\/wp-json\/wp\/v2\/ht_kb_tag?post=791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}