Last active
March 16, 2018 23:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Ambient.h" // Ambientのヘッダーをインクルード | |
Ambient ambient; // Ambientオブジェクトを定義 | |
unsigned int channelId = 100; // AmbientのチャネルID | |
const char* writeKey = "writeKey"; // ライトキー | |
void setup() { | |
... | |
ambient.begin(channelId, writeKey, &client); // チャネルIDとライトキーを指定してAmbientの初期化 | |
} | |
void loop() { | |
... // センサーの値を読む | |
// センサー値をAmbientに送信する | |
ambient.set(1, data1); | |
ambient.set(2, data2); | |
ambient.send(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment