![](/media/cache/profiles/acab0116c354964a558e65bdd07ff047.jpg.50x50_q85.jpg)
Syggestions
Dependencies: CheckRTC LPS25H hts221
Fork of ELEC350-extended-referral2 by
Diff: main.cpp
- Revision:
- 44:ca34a376a17c
- Parent:
- 43:a9682b81632b
- Child:
- 45:fac0d195fc65
diff -r a9682b81632b -r ca34a376a17c main.cpp --- a/main.cpp Wed Nov 22 12:48:08 2017 +0000 +++ b/main.cpp Wed Nov 22 13:09:15 2017 +0000 @@ -72,11 +72,8 @@ }//end if buffer readall Thread::wait(200); - - Thread::signal_wait(READALL_OFF); - scanf("%127s", buffer); - strftime(date, 32, "%Y/%m/%d %a", localtime(&seconds)); - strftime(time, 32, "%H:%M:%S %p", localtime(&seconds)); + //Thread::signal_wait(READALL_OFF); + if(buffer_str=="SETTIME") {// begin if buffer settime set_time(1508268288); printf("time and date updated to %s %s\n\r", time, date); @@ -88,10 +85,8 @@ Thread::wait(200); - Thread::signal_wait(SETTIME_OFF); - scanf("%127s", buffer); - strftime(date, 32, "%Y/%m/%d %a", localtime(&seconds)); - strftime(time, 32, "%H:%M:%S %p", localtime(&seconds)); + //Thread::signal_wait(SETTIME_OFF); + if(buffer_str=="SETT") // begin if buffer sett for (count = 0; count < 5; count++) { sz = snprintf(NULL, 0,"%s, %s, %4.2fC , %3.1f%%, %6.1f, %4.1f\n\r", time, date, tempCelsius, humi, barometer.pressure(), barometer.temperature()); @@ -108,8 +103,8 @@ - Thread::signal_wait(SETT_OFF); - scanf("%127s", buffer); + //Thread::signal_wait(SETT_OFF); + if(buffer_str=="READ") { //begin if buffer read printf("%s\n\r", buf); myled = 1;