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.
Revision 4:9b16e07857ed, committed 2018-12-17
- Comitter:
- Ambroisie
- Date:
- Mon Dec 17 15:38:29 2018 +0000
- Parent:
- 3:2db94ee076ee
- Commit message:
- aze
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Feb 05 15:32:38 2014 +0000
+++ b/main.cpp Mon Dec 17 15:38:29 2018 +0000
@@ -1,20 +1,43 @@
#include "mbed.h"
#include "C12832.h"
-
+C12832 lcd(p5, p7, p6, p8, p11);
+AnalogIn mesure(p17);
+AnalogIn mesure2(p18);
+float T;
+float E;
+LocalFileSystem local("local");
+DigitalOut myled(LED1);
-C12832 lcd(p5, p7, p6, p8, p11);
+int j;
int main()
{
- int j=0;
lcd.cls();
lcd.locate(0,3);
- lcd.printf("mbed application board!");
+ lcd.printf("On affiche la temperature");
+ FILE* fp=fopen("/local/mesures.csv","w");
+ for(j=0;j<5;j=j+1){
+ lcd.cls();
+ lcd.locate(0,3);
+ T=330*mesure;
+ E=78*mesure2;
+ lcd.printf("%f\n\r",T);
+ fprintf(fp,"%d;%f;%f;\n",j,T,E);
+ myled=1;
+ wait(0.5);
+
+ myled=0;
+
+ wait(0.5);
+
+ }
+ fclose(fp);
+
+ }
- while(true) { // this is the third thread
- lcd.locate(0,15);
- lcd.printf("Counting : %d",j);
- j++;
- wait(1.0);
- }
-}
+
+
+
+
+
+