thingsboard-client-sdk
thingsboard-client-sdk copied to clipboard
Compile Issue with
I am trying to send data to thingsboard.cloud.
I've included "ThingsBoard.h" in my .cpp file
I am successfully connected via the THINGSBOARD_SERVER and TOKEN
When I execute the following as a test tb.sendTelemetryInt("temperature", 22);
I get the following compile errors:
sketch\test.cpp.o:(.literal._ZN9test4initEv+0x4c): undefined reference to Telemetry::serializeKeyval(ArduinoJson6185_D1::VariantRef&) const' sketch\test.cpp.o: In function
bool ThingsBoardSized<64u, 8u, ThingsBoardDefaultLogger>::sendKeyval
Can you please tell me what is wrong..
I eventually want to send a JSON string
Thanks
Also I have tried this:
const int data_items = 2; Telemetry data[data_items] = { { "temperature", 42.2 }, { "humidity", 80 }, };
tb.sendTelemetry(data, data_items);
and get compile issues:
undefined reference to Telemetry::serializeKeyval(ArduinoJson6185_D1::VariantRef&) const' In function
ThingsBoardSized<64u, 8u, ThingsBoardDefaultLogger>::sendDataArray(Telemetry const*, unsigned int, bool)':
undefined reference to Telemetry::serializeKeyval(ArduinoJson6185_D1::VariantRef&) const' undefined reference to
Telemetry::serializeKeyval(ArduinoJson6185_D1::VariantRef&) const'