Skip to content

Instantly share code, notes, and snippets.

@sepfy
Last active September 12, 2020 11:32
Show Gist options
  • Save sepfy/fb274680ddfe4204a288097077383c38 to your computer and use it in GitHub Desktop.
Save sepfy/fb274680ddfe4204a288097077383c38 to your computer and use it in GitHub Desktop.
...
//char* reportedProperties = serializeToJson(&car);
char reportedProperties[512];
sprintf(reportedProperties, "{\"temperature\": 27.6, \"humidity\": 67.3}");
if (reportedProperties != NULL)
{
(void)IoTHubDeviceClient_LL_SendReportedState(iotHubClientHandle, (const unsigned char*)reportedProperties, strlen(reportedProperties), reportedStateCallback, NULL);
(void)IoTHubDeviceClient_LL_SetDeviceMethodCallback(iotHubClientHandle, deviceMethodCallback, NULL);
(void)IoTHubDeviceClient_LL_SetDeviceTwinCallback(iotHubClientHandle, deviceTwinCallback, &car);
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment