Skip to content

Instantly share code, notes, and snippets.

@TakehikoShimojima
Last active March 16, 2018 23:46
#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