Last active
March 16, 2018 23:46
-
-
Save TakehikoShimojima/ddc5650a39e61e626592dfbacfc6df4e to your computer and use it in GitHub Desktop.
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