B+IMU+SD
Dependencies: BMI160 RTC SDFileSystem USBDevice max32630fthr
Fork of MPSMAXbutton by
Diff: RTClock.cpp
- Revision:
- 3:bd223559f79b
diff -r 769c5a7b3939 -r bd223559f79b RTClock.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/RTClock.cpp Wed May 09 11:01:18 2018 +0000 @@ -0,0 +1,25 @@ +#include "RTClock.h" +extern Serial _serialport; + +void initRTC(){ + time_t seconds = time(NULL); +} + +void setRTCTime(){ + +} + + +void loadNextMove(){ + +} + +void printRTCTime(){ + time_t seconds = time(NULL); + _serialport.printf("Time as seconds since January 1, 1970 = %d\n", seconds); + _serialport.printf("Time as a basic string = %s", ctime(&seconds)); + char buffer[32]; + strftime(buffer, 32, "%I:%M %p\n", localtime(&seconds)); + _serialport.printf("Time as a custom formatted string = %s", buffer); + +}