Code Monkey home page Code Monkey logo

ambient_esp8266_lib's Introduction

ESP8266/ESP32用Arduino・Ambientライブラリー

AmbientはIoTデーターの可視化サービスです。 マイコンから送られたデーターを受信し、蓄積し、可視化(グラフ化)します。

Ambient structure

Ambientにユーザー登録(無料)し、マイコンからデーターを送ると、こんな感じでグラフ表示させることができます。

Ambient chart

ここではArduino ESP8266/ESP32用のライブラリーとサンプルを示しています。サンプルには次のプログラムがあります。

  • 環境モニター(examples/Ambient_ESP8266): ESP8266と温度・湿度センサーのHDC1000を使い、温度、湿度を測定し、Ambientに送信してモニターします。解説を「Arduino ESP8266で温度・湿度を測定し、Ambientに送ってグラフ化する」に書きました。
  • 心拍モニター(examples/Ambient_HeartBeat): ESP8266と心拍センサーを使い、心拍波形をグラフ化します。解説を「ESP8266と心拍センサーとAmbientで心拍波形をモニターする」に書きました。
  • 消費電流モニター(examples/Ambient_CurrentLogger): ESP8266と電流値モジュールINA226PRCを使い、マイコンの消費電流をモニターします。解説を「AmbientとArduino ESP8266でマイコンの消費電流モニターを作る」に書きました。
  • 電力モニター(examples/Ambient_powermonitor): ESP8266と電流クランプで家庭などの電力使用状況をモニターします。解説を「Arduino ESP8266とAmbientで家の電力使用をモニターする」に書きました。
  • ESPr DeveloperとBME280の動作確認(examples/Ambient_ESP_BME280_test/): ESPr DeveloperとBME280の動作確認プログラムです。
  • ESPr DeveloperとBME280で温度、湿度、気圧を測定(examples/Ambient_ESP_BME280/): ESPr DeveloperとBME280で温度、湿度、気圧を測定し、Ambientに送信します。測定と測定の間はdelay()で待ちます。
  • ESPr DeveloperとBME280で温度、湿度、気圧を測定(examples/Ambient_ESP_BME280_ds/): ESPr DeveloperとBME280で温度、湿度、気圧を測定し、Ambientに送信します。測定と測定の間はDeep Sleepで待ちます。

材料

  • Ambient.h: Ambient用のヘッダーファイル
  • Ambient.cpp: Ambientライブラリーのソースファイル
  • examples/Ambient_ESP8266: 環境モニターのソースファイル
  • examples/Ambient_HeartBeat: 心拍モニターのソースファイル
  • examples/Ambient_CurrentLogger: 消費電流モニターのソースファイル
  • examples/Ambient_powermonitor: 電力モニターのソースファイル
  • examples/Ambient_ESP_BME280_test/: ESPr DeveloperとBME280の動作確認プログラム
  • examples/Ambient_ESP_BME280/: ESPr DeveloperとBME280で温度、湿度、気圧を測定
  • examples/Ambient_ESP_BME280_ds/: ESPr DeveloperとBME280で温度、湿度、気圧を測定 (Deep Sleep版)

ライブラリーのインポート方法、サンプルプログラムの動かし方はAmbientサイトに書きましたので、ご参照ください。

ambient_esp8266_lib's People

Contributors

chobichan avatar k-takata avatar takehikoshimojima avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ambient_esp8266_lib's Issues

有線LANでつなげられますか

M5Stackを有線LANで使用したく、M5Stack用のW5500 LANユニットをM5Core2につなげて使いたいとおもいます。

ambient.begin(channelId, writeKey, &client);

がWifIclientでは使えるのですが、これをEthernet接続でも使えるようにはできないものでしょうか。

channelIdで65535以上の数を利用する際にambientサーバにconnect出来ない場合がある

  • 現象
    • 私の利用の環境(Arduino/ATMega2560 R3+ ESP-12S)で利用した際に、データをambientサーバに登録できない現象がありました。
  • 詳細
    • デバッグしてみたところ、channelIdが65535を超えている際に、loopしたchannelIdでサーバに登録しているように見えました。(例えば67535をchannelIdとして利用しようとすると、2000で登録しに行こうとしているようにlogでは見える)
  • 対応
    • 上記現象から、(処理系によるのだとは思いますが)unsigned short的に扱われているようだと推測し、channelIdを利用している箇所をすべて、unsigned long channelIdとしたり、%uで出力させているところを%luとすることで、登録できるようになりましたのでご報告です。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.