lyre liu / Mbed 2 deprecated project1

Dependencies:   mbed

Revision:
4:8af87a432c12
Parent:
3:2566acb12c47
Child:
5:ff47bcaebc64
diff -r 2566acb12c47 -r 8af87a432c12 main.cpp
--- a/main.cpp	Sun Mar 06 13:36:17 2016 +0000
+++ b/main.cpp	Sun Mar 06 13:41:41 2016 +0000
@@ -1,5 +1,6 @@
 #include "mbed.h"
 #define RATIO 1                      //The amplified factor of the OA  ??????????????????????????????????????????????????
+#define SAMPLE_TIME 100             // Sample time, default is 100ms
 void MassCompute(float);            // The function of computing mass from voltage.
 void SerialInit(void);              // The function fo serial initial
 void SerialTransmit(void);          // Transmit the data through the serial
@@ -26,7 +27,7 @@
     {
         MassCompute(voltage.read());  
         SerialTransmit();
-        wait_ms(100);               //Wait for 100ms, this is the sample time.
+        wait_ms(SAMPLE_TIME);               //Wait for 100ms, this is the sample time.
     }      
 }