I am using a I2C RTC DS1307 Clock Module and the RTClib in my project.
What I am trying to do is set the time 'unix time' over a serial command.
So I input S1349949137# over serial, and set as 'timeString'
S=Set / 1349949137=unix time / #=End of msg.
I then remove the S and # leaving just the unix time.
String timeString = inputString.substring(1,11);
Now this is were I am stuck.
This dose not work because I need to convert from a string to uint32_t. I think?
If I use this code it works and set the correct time and date.
uint32_t n = 1349949137;
How can I convert 'timeString' to uint32_t.
I am new to converting and am not sure what's the best solution to my problem.