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.
Diff: main.cpp
- 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.
}
}