Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- shivanandgowdakr
- Date:
- 2018-06-06
- Revision:
- 0:6ffa61b54883
- Child:
- 1:327e9488a197
File content as of revision 0:6ffa61b54883:
#include "mbed.h"
#include "RTC.h"
DigitalOut led1(LED1);
Thread Time;
char Current_Time[15]={'\0'};
void Print_Date_Time(void)
{
while(true){
Get_Date_Time(Current_Time);
led1=!led1;
printf("Date and Time is %s\r\n",Current_Time);
wait(1);
}
}
// main() runs in its own thread in the OS
int main() {
char Time_2_Set[15]= "28022016235955";//{'\0'};
if(iSetTerminalTime(Time_2_Set)) {
printf("Time Set Success\r\n");
}
Time.start(Print_Date_Time);
}