Ehhh T NUL

Dependencies:   mbed bloc_io mbed-rtos html

Files at this revision

API Documentation at this revision

Comitter:
Couscousiste
Date:
Tue Dec 17 09:58:30 2019 +0000
Parent:
5:e3b59050984c
Commit message:
Yo

Changed in this revision

EthernetInterface.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/EthernetInterface.lib	Tue Dec 17 09:04:10 2019 +0000
+++ b/EthernetInterface.lib	Tue Dec 17 09:58:30 2019 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/users/superphil06/code/EthernetInterface/#4b1f024da5b7
+https://os.mbed.com/teams/CharKik-PoulpGas/code/EthernetInterface/#2d22b8a51b4c
--- a/main.cpp	Tue Dec 17 09:04:10 2019 +0000
+++ b/main.cpp	Tue Dec 17 09:58:30 2019 +0000
@@ -17,6 +17,7 @@
 // analog input connected to mbed
 // valid pmw mbed pin
 Serial pc(USBTX, USBRX); // tx, rx
+
 // Top_Hall Pin
 float pi=3.14159265359;
 int valref=0 ;//rajout
@@ -30,6 +31,8 @@
 int frein;
 int overcurrent;
 float gaz;
+float temp;
+float courrant;
 
 
 //void modulo (int );
@@ -213,6 +216,7 @@
         pc.printf(" veuillez saisir un choix parmi la liste proposee: \r\n");
         pc.printf(" a:saisie consigne pwm \r\n");
         pc.printf(" c:lecture interne \r\n");
+        pc.printf(" d:%analogique \r\n");
         pc.printf(" b:calibration \r\n");
         pc.printf(" v:vitesse\r\n");
         pc.printf(" m:mode \r\n");
@@ -253,8 +257,12 @@
                 getchar();
                 max=poignee.read();
                 printf("max%f\n\r",max);
-
                 break;
+                
+            case 'd' :
+                Jack();
+                break;
+                
             case 'm':
                 do {
                     printf("choisissez un mode :0 pour automatique et 1 pour manuel");
@@ -437,3 +445,14 @@
    kpar=kpar+lire;
    ktot=ktot+lire;
 }
+
+void Jack ()
+{
+    valGaz=((Vgaz-min)*100)/(max-min);
+    x=Vbat.read();
+    pc.printf("%g",x);
+    valBat=(100*x); //20=val max batterie
+    Temp;
+    Courrant;
+    pc.printf("Poigne : %g \t Batterie : %g \n\r",valGaz,valBat);
+}
\ No newline at end of file