Skip to content

Instantly share code, notes, and snippets.

View hauserkristof's full-sized avatar

Kristof Hauser hauserkristof

View GitHub Profile
@hauserkristof
hauserkristof / d2cMsg.c
Created June 15, 2021 17:01
Send D2C message #IoTHub
(void)printf("Sending 1 messages to IoTHub every %d seconds for %d messages (Send any message to stop)\r\n", TIME_BETWEEN_MESSAGES, MESSAGES_TO_SEND);
do
{
if (iothub_info.connected != 0)
{
// Send a message every TIME_BETWEEN_MESSAGES seconds
(void)tickcounter_get_current_ms(tick_counter_handle, &current_tick);
if ((current_tick - last_send_time) / 1000 > TIME_BETWEEN_MESSAGES)
{
static char msgText[1024];