woravee chanlongrat / Mbed 2 deprecated Project_strian_guage_final

Dependencies:   HX711 mbed

Fork of 10B_Project_strian_guage_final by FRA221_2015

Revision:
1:7bfd7b4fb1a0
Parent:
0:f9c921b8780c
Child:
2:b0a005b75d95
--- a/main.cpp	Tue Dec 08 09:03:22 2015 +0000
+++ b/main.cpp	Tue Dec 08 16:52:06 2015 +0000
@@ -4,9 +4,10 @@
 #define standard_poid (float)0.030
 #define standard_kilo (float)0.2
 Serial pc(USBTX,USBRX);
+//Serial da(PA_11,PA_12);
 DigitalIn setzero_switch(D15);
-/*
-Serial pc(D8,D2);
+//DigitalOut LED(D14);
+//Serial pc(D8,D2);
 HX711 mudule1(A1, A0);
 HX711 mudule2(A3, A2);
 HX711 mudule3(A5, A4);
@@ -15,15 +16,6 @@
 HX711 mudule6(D7, D9);
 HX711 mudule7(D10, D11);
 HX711 mudule8(D12, D13);
-*/
-HX711 mudule1(A1, A0);
-HX711 mudule2(A3, A2);
-HX711 mudule3(A5, A4);
-HX711 mudule4(D3, D2);
-HX711 mudule5(D5, D6);
-HX711 mudule6(D7, D9);
-HX711 mudule7(D10, D11);
-HX711 mudule8(D12, D13);
 float find_kilo(float valeur,float valeurTare);
 class Find_kg
 {
@@ -39,7 +31,7 @@
 
 int main()
 {
-
+    pc.printf("START Application !\n");
     pc.baud(115200);
     Find_kg strain_guage_1;
     Find_kg strain_guage_2;
@@ -69,10 +61,11 @@
     uint8_t state_show=0;
     uint8_t state_exit =0;
     uint8_t data;
+    //int check_data=0;
+    //int c[5],count=1;
     float module1,module2,module3,module4;
     float module5,module6,module7,module8;
     int gram_output;
-    //int state_mass =0;
     int state_select=0;
     float kilo_output;
     float kilo_output1,kilo_output2;
@@ -81,7 +74,6 @@
     int kilo_calibrate[4];
     int kilo_calibrate_8plate[8];
     int state_onemass=0,state_multiple_mass=0;
-    pc.printf("START Application !\n");
     while(1) {
         if(state_show == 0) {
             pc.printf("Select Menu !\n");
@@ -119,7 +111,7 @@
                         module2=0;
                         module3=0;
                         module4=0;
-                        wait_ms(1000);
+                        //wait_ms(1000);
                         valeur1 = mudule1.getValue();
                         valeur2 = mudule2.getValue();
                         valeur3 = mudule3.getValue();
@@ -2859,7 +2851,7 @@
 
                          } while(state_exit ==0);
                     break;
-
+                    
                 default:
                     pc.printf("plase select menu 1 , 2 or 3 only\n");
                     pc.printf("\n\n");