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.
Dependencies: CheckRTC LPS25H hts221
Fork of ELEC350-extended-referral2 by
Revision 44:ca34a376a17c, committed 2017-11-22
- Comitter:
- spanesar
- Date:
- Wed Nov 22 13:09:15 2017 +0000
- Parent:
- 43:a9682b81632b
- Child:
- 45:fac0d195fc65
- Commit message:
- thread error but have to keep on pressing reset button to work
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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;
