#include <ApiClient.h>
#include <KeenClient.h>
KeenClient keen;
void setup() {
Bridge.begin();
Console.begin();
while (!Console);
keen.setApiVersion(F("3.0"));
keen.setProjectId(F("PROJECT_KEY_HERE"));
keen.setWriteKey(F("WRITE_KEY_HERE"));
}
void loop() {
keen.addEvent("test_collection", "{\"motion_state\": \"start\"}");
keen.printRequest();
while (keen.available()) {
char c = keen.read();
Console.print(c);
}
Console.println();
Console.flush();
delay(10000);
}