I want to add a timestamp with the data I am collecting in Contiki. When I am adding time.h from c library, it is showing that the associated files are missing. Can someone show to add the time stamp either using standard C files or using Contiki library?
0
votes
3 Answers
0
votes
0
votes
0
votes
I had a similar requirement in my project. I did the following.
- Use microcontroller RTC to get date and time
- Convert that into Unix timestamp. If you just google you can find simple C code for converting date and time into Unix timestamp.
- Send timestamp with payload, my payload is in json format so I use a key to distinguish from other data.
Hope this helps.