I am using nrf52832 chip. I will be receiving time in isoFormat.
I am wondering how convert the iso format to get the date and time in my C program.
I am not using any RTOS but doing everything on baremetal.
I am using nrf52832 chip. I will be receiving time in isoFormat.
I am wondering how convert the iso format to get the date and time in my C program.
I am not using any RTOS but doing everything on baremetal.
Hi
So essentially you are getting a string with the date and time in ISO format?
I made a small example earlier showing how to use the time.h library on the nRF52DK, but the time.h library doesn't have a function for converting a string into a time object (only the opposite).
The following thread shows a way to use sscanf(..) to break down a date/time string into sub components, together with the date/time struct defined in time.h. You should be able to combine that example with the code I shared earlier:
https://cboard.cprogramming.com/c-programming/169114-how-convert-string-time_t.html
Best regards
Torbjørn
@Torbjørn Is there a android library which will take a calendar and which will send the data to the BLE?
@Torbjørn Is there a android library which will take a calendar and which will send the data to the BLE?