Relative Content

Daily Archives: 2017年11月10日

WeMos (d2) Home Automation

TinyWebDB-APIを利用した、Home Automationの例。 ハードウェア “IoT-Cloud-Mobile Study Kit”を利用 データ送信 下記のは操作中、数分起き温度、気圧センサーのデータをTinyWebDB-APIテストサーバ(http://tinydb.ml/api/)へ送信する。 送信したデータは、http://tinydb.ml/status/で確認できる。 データ受信 スマートフォンからLED On/Off の指令は受信すると、ESP8266内蔵LEDは点/滅可能になった。 ソースコード // Sample Arduino Json Web Client // Downloads and parse http://jsonplaceholder.typicode.com/users/1 // // Copyright Benoit Blanchon 2014-2017 // MIT License // // Arduino JSON library // https://bblanchon.github.io/ArduinoJson/ // If you like this project, please add a star! #include <ArduinoJson.h> #include <Arduino.h> […]