Relative Content

Daily Archives: March 24, 2021

M5stickC send data to TinyWebDB

https://iot.uc4.net/ubisense1/wemos-d2-home-automation/ 上記のページを参考に進める。 温度センサーの代わりに、6軸センサーのデータを活用。(6軸センサーの例は、参考1) コード 動作の詳細は未確認コードだが、とりあえず動くので、アップする。   // 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> #include <M5StickC.h> #include <WiFi.h> #include <WiFiMulti.h> #include <HTTPClient.h> […]

TinyWebDB API@WP

WordPress に TinyWebDB API WordPressに API機能を追加して、クライドとして利用する方法を試み。 WP-TinyWebDB-APIは、両者の長所を連携し、WordPressをAppInventorのTinyWebDBサービスとして利用するためのAPIを、WordPressのプラグインとして提供したもの。 本章は、WP-TinyWebDB-APIのインストール、Postman を使ってAPIの動作確認する。 WP-TinyWebDB-APIのインストール 公式サイトを利用する 管理パネルの「Plugins」タブ上のpluginを追加してください。 tinywebdb を検索して、インストールしてください。 管理パネルの「Plugins」タブ上のpluginを有効化してください。 Activate the plugin on the “Plugins” tab of the administration panel. APIの動作確認 サイトをブラウザーで開くと、普通のWordPressのサイトに見える http://tinywebdb.edu2web.com/ 追加したAPI機能をみる。(これをTinyWebDBのServiceURLにセットする) http://tinywebdb.edu2web.com/api データの取得 http://tinywebdb.edu2web.com/api/getvalue/ http://tinywebdb.edu2web.com/api/getvalue/?tag=questionsChenLab Postman を使ってAPIの動作確認 ブラウザから取得したデータは、少々見にくい。PostmanというChrome の拡張を使うと、便利。認証、パラメタ引き渡しもできる。 データの送信 http://tinywebdb.edu2web.com/api/storeavalue/