Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #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();
- }
Add Comment
Please, Sign In to add comment