1

I want to send accelerometer data to IBM iot cloud using c language.

In this i am using json format to publish event in cloud.

char *data="{\"d\" : {\"x\" : 43 }}"; //is working correctly ..

I want to send instant values through this pointer in JSON Format.. Please help me how to send the instant values by using JSON format in IBMIOTfclient side

amadain
  • 2,724
  • 4
  • 37
  • 58
raj
  • 53
  • 1
  • 7

1 Answers1

0

If you use the IBMIOTfclient (iotfclient.h) you can call publishEvent, like:

publishEvent(&client, "accel","json", "{\"d\" : {\"x\" : 43 }}", QOS0);

There is a sample in github.

amadain
  • 2,724
  • 4
  • 37
  • 58