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: LCD_fonts SPI_TFT_ILI9341 CMSIS_DSP_401_without_cm4 mbed-src SDFileSystem wavfile
Revision 13:ab0285338951, committed 2015-12-14
- Comitter:
- linx0576
- Date:
- Mon Dec 14 22:13:11 2015 +0000
- Parent:
- 12:ed94d67bd36b
- Commit message:
- update
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sun Dec 13 20:06:12 2015 +0000
+++ b/main.cpp Mon Dec 14 22:13:11 2015 +0000
@@ -157,7 +157,7 @@
float32_t stst=0;
char log[10][32];
float32_t mselog[10] = {NULL};
- set_time(1448935737); // Set RTC time to Dec 01 2015 02:09 AM
+// set_time(1448935737); // Set RTC time to Dec 01 2015 02:09 AM
int pu, pd, ps; // LL left & right
TFT.claim(stdout); // send stdout to the TFT display
TFT.claim(stderr); // send stderr to the TFT display
@@ -437,6 +437,17 @@
WaitForResponse("OK");
TFT.locate(10,row); TFT.printf("Connected to the Network"); row+=10;
+/* float32_t m[6] = { 6.025026, 9.928841, 8.930499, 7.013349, 6.081062, 5.389579};
+ int k;
+ int l[6] = { 1448934757, 1448935757, 1448935837, 1448938857, 1448940757, 1448945757};
+
+ for (k=0; k<6; k++)
+ { set_time(l[k]);
+ time_t seconds = time(NULL);
+ strftime(log[k], 32, "%b %d %Y %I:%M %p\n", localtime(&seconds));
+ TFT.printf("%s MSE: %f\n\n", log[k], m[k]);
+ }*/
+
TFT.locate(165,270);
printf("Return");
TFT.rect(150,265,220,285,Green);
@@ -473,7 +484,7 @@
}
if (stage==5) //recording... with interval
- { int t = 2*(h*60+m);
+ { int t = 4*(h*60+m);
int t1, abc;
float32_t sum, sum_mse, sum_st;
TFT.set_font((unsigned char*) Arial24x23);
@@ -494,7 +505,7 @@
TFT.rect(13,255,225,285,Green);
while (stage==5)
- { sum=0; sum_mse=0; sum_st=0;
+ { sum=0; sum_mse=0; sum_st=0; t1=0;
RECORD();
MSE();
@@ -523,7 +534,7 @@
while(t1<t)
{ ps = ain3.read();
- if (ps==0) { t1++; wait(0.5); }
+ if (ps==0) { t1++; wait(0.2); }
else if (ps==1) { wait(0.3); TFT.cls(); stage=0; break; }
}
}