Pour Marc la mignonne

Dependencies:   BSP_DISCO_F429ZI LCD_DISCO_F429ZI TS_DISCO_F429ZI mbed

Revision:
0:fcce18d01987
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchescreen.cpp	Thu May 31 06:11:25 2018 +0000
@@ -0,0 +1,107 @@
+#include "mbed.h"
+#include "screen.h"
+#include "LCD_DISCO_F429ZI.h"
+#include "Touchescreen.h"
+
+LCD_DISCO_F429ZI lcdt;
+//DigitalOut led1(LED1);
+
+
+// marchent : PF9 PF7 PF8 PC4 PC0 PC1 PC2 PC3 PA7 PC5
+  
+ /* 
+
+//Premiere rangée de capteur
+AnalogIn capt11(PF_7);
+AnalogIn capt12(PF_8);
+AnalogIn capt13(PF_9);
+
+//Deuxieme rangée de capteur
+AnalogIn capt21(PC_4);
+AnalogIn capt22(PC_1);
+AnalogIn capt23(PC_2);
+
+//Troisième rangée de capteur
+AnalogIn capt31(PC_3);
+AnalogIn capt32(PA_7);
+AnalogIn capt33(PC_5);
+
+
+
+
+
+*/
+
+
+
+
+
+/*
+
+DigitalOut led(LED1);
+DigitalOut test(PA_0);
+DigitalOut mot1(PE_12);
+DigitalOut mot2(PE_14);
+int valeur_neg;
+
+void init_neg(){
+    valeur_neg=(capt11.read()*10000+capt12.read()*10000+capt13.read()*10000)/3;
+    wait(0.001);}
+    
+*/
+
+
+
+
+void affichage(int valeur,int place){
+   /* float value=0;
+    float value1=0;
+    float value2=0;
+    float value3=0;
+    screen_init();
+    lcd.Clear(LCD_COLOR_GREEN);
+    init_neg();
+    while(1){
+        value1 = capt11.read()*10000;
+        value2 = capt12.read()*10000;
+        value3 = capt13.read()*10000;*/
+        showIntegerScreen((int)(valeur),place,0,CENTER_MODE);
+      /*  showIntegerScreen((int)(value2),3,0,CENTER_MODE);
+        showIntegerScreen((int)(value3),4,0,CENTER_MODE);
+        showIntegerScreen(valeur_neg,0,0,LEFT_MODE);
+        value=(value1+value2+value3)/3;
+        
+        value1 = capt21.read()*10000;
+        value2 = capt22.read()*10000;
+        value3 = capt23.read()*10000;
+        showIntegerScreen((int)(value1),5,0,CENTER_MODE);
+        showIntegerScreen((int)(value2),6,0,CENTER_MODE);
+        showIntegerScreen((int)(value3),7,0,CENTER_MODE);
+        
+        value1 = capt31.read()*10000;
+        value2 = capt32.read()*10000;
+        value3 = capt33.read()*10000;
+        showIntegerScreen((int)(value1),8,0,CENTER_MODE);
+        showIntegerScreen((int)(value2),9,0,CENTER_MODE);
+        showIntegerScreen((int)(value3),10,0,CENTER_MODE);
+        if(value>valeur_neg){
+            test=1;}
+        else{
+            test=0;}
+        mot1=1;
+        mot2=0;
+        wait(2);
+        mot1=1;
+        mot2=1;
+        wait(0.5);
+        mot1=0;
+        mot2=1;
+        wait(2);
+        mot1=0;
+        mot2=0;
+        wait(1);
+        
+        */
+        
+        wait(0.1);    
+} 
\ No newline at end of file