Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

DataLogger send data to cloud


XDK1405 Sep 27, 2019 12:30 AM

Hello everyone,

I'm using a CR300 DataLogger in an Azure IoT project. After collecting data from sensors I was able to send data to IoT Hub over HTTP protocol, using the CRBasic HTTPPost() command. Azure IoT hub allows D2C messages to be sent over HTTP, AMQP or MQTT.

I'm more interested more in using the MQTT protocol. Had anyone tried, or succeeded to send messages over MQTT from CRBasic until now?  If yes, please provide me with a short example, or any other hints.

Thanks in advance!


Alex Messina Feb 10, 2021 09:55 AM

Could you post your CRBASIC code for this?


GaryTRoberts Feb 11, 2021 11:15 AM

In the next release of the CR1000X and CR6 OS (coming soon), there will be some new CRBasic instructions that will make working with MQTT easier. This functionality in the CR300 will come in a future release (no specific dates on when yet).

HTTP capabilities to interact with cloud or web-based APIs are already in the operating systems. For an example, look at https://www.campbellsci.com/blog/post-cr6-data-to-weather-underground. There is example CRBasic code you can look at there.

Log in or register to post/reply in the forum.