Community news, upcoming events and general discussions
Threads: 36 Posts: 88
Get technical support from the community
Threads: 1397 Posts: 7500
Threads: 18 Posts: 64
Tell us how to make XDK better!
Threads: 36 Posts: 119
Share and discuss community member projects
Threads: 76 Posts: 337
I'm working since a few days with mita. My goal is to send the sensor data to a broker via MQTT. The Connection to WiFi and also MQTT is working already.
Now I want into the payload of the messages next to the sensor value also a timestamp.
While searching how to integrate a the timestamp I found 'this'.
I have copied the code for "systime.h" as described.
Also the right timestamp is printed into the console. Therefore I'm sure the connection to the SNTP-Server is also working.
But now to my Problem, I have no idea how to get the timestamp from the c-file into the mita file.
It would be nice, if someone knows how to declare the timestamp that it is callable in mita.
Thanks in advance!
Here is a description of how to make a function written in native C known to Mita: https://www.eclipse.org/mita/language/foreignfunctioninterface/#native-functions