Ambient library. It provides "set" function to set data to a packet and "send" function to send the packet to the Ambient server. It also provides "bulk_send" function to send multiple data. (Japanese: IoT用のクラウドサービス「Ambient」のデーター送信ライブラリーです。Ambientはマイコンから送られたセンサーデーターを受信し、蓄積し、可視化(グラフ化)します。http://ambidata.io)

Dependents:   AmbientExampleSITB AmbientHeartRateMonitor AmbientHeartBeat AmbientExampleSITB_ws ... more

Revision:
2:a319af936fd5
Parent:
1:dcc2714b5bcb
Child:
3:a724fe60de46
--- a/Ambient.cpp	Mon Jun 06 11:41:56 2016 +0000
+++ b/Ambient.cpp	Tue Jun 07 07:47:53 2016 +0000
@@ -1,19 +1,27 @@
 #include "Ambient.h"
 
-#define _DEBUG 0
+#define AMBIENT_DEBUG 0
+#define SimpleIoTBoard 1
 
-#if _DEBUG
+#if AMBIENT_DEBUG
+#if SimpleIoTBoard
+#include "SoftSerialSendOnry.h"
+extern SoftSerialSendOnry pc;
+#define DBG(...) { pc.printf(__VA_ARGS__); }
+#define ERR(...) { pc.printf(__VA_ARGS__); }
+#else
 #define DBG(...) { printf(__VA_ARGS__); }
 #define ERR(...) { printf(__VA_ARGS__); }
+#endif /* SOFTSERIAL_SEND_ONRY_H */
 #else
 #define DBG(...)
 #define ERR(...)
-#endif /* _DBG */
+#endif /* AMBIENT_DEBUG */
 
 const char* AMBIENT_HOST = "54.65.206.59";
 const int AMBIENT_PORT = 80;
-const char* AMBIENT_HOST_DEV = "192.168.0.8";
-const int AMBIENT_PORT_DEV = 4567;
+const char* AMBIENT_HOST_DEV = "54.65.206.59";
+const int AMBIENT_PORT_DEV = 80;
 
 const char * ambient_keys[] = {"\"d1\":\"", "\"d2\":\"", "\"d3\":\"", "\"d4\":\"", "\"d5\":\"", "\"d6\":\"", "\"d7\":\"", "\"d8\":\"", "\"lat\":\"", "\"lng\":\"", "\"created\":\""};