Hi, I'm currently trying to send real time analog sensor data to hivemq broker using nrf9160 DK, is it possible to provide source code for this kind of project? I've attached my current code below as well. Thanks
Hi, I'm currently trying to send real time analog sensor data to hivemq broker using nrf9160 DK, is it possible to provide source code for this kind of project? I've attached my current code below as well. Thanks
Hi,
is it possible to provide source code for this kind of project?
What do you mean by this? Could you explain some more?
We are currently connecting a sensor to nrf9160_dk and we have successfully gotten the data and print them on serial monitor. We have also succesully connected lte link to print simple string on mqtt broker(hivemq) by using the mqtt_simple sample source code. So we are trying to send the data from the sensors to the mqtt broker but we are unable to do that. Do you have any example that sends the sensor data to mqtt broker?
yeo said:I have added the code above in my function and I am still having the same issue.
And did you get any errors returned?
yeo said:but the data_publich function require char form
No, it's just a uint8_t buffer
it does not publish anything after u added the code.
May I ask why this data cannot be publish (instead of string I am publishing integer)
data_publish(&client, MQTT_QOS_1_AT_LEAST_ONCE, 123, 3);
What did data_publish() return ?
It will be printed in the log as "Publish failed: #err_code"
Hi, thanks for the reply! I have modified my code I managed to publish the data. But I am facing another issue which is the ADC pin reading data is not updating. I have posted my code and issue in another forum, could you give some advice on the code? Below is the link to the forum.
Hi, thanks for the reply! I have modified my code I managed to publish the data. But I am facing another issue which is the ADC pin reading data is not updating. I have posted my code and issue in another forum, could you give some advice on the code? Below is the link to the forum.