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.
Dependencies: mbed MODSERIAL FastPWM ADS8568_ADC
Diff: main.cpp
- Revision:
- 9:3c5a43ce68bb
- Parent:
- 8:325f68c1e3d2
- Child:
- 10:a64434365090
diff -r 325f68c1e3d2 -r 3c5a43ce68bb main.cpp
--- a/main.cpp Mon Feb 04 11:04:58 2019 +0000
+++ b/main.cpp Wed Jun 26 08:55:30 2019 +0000
@@ -3,6 +3,9 @@
#define CH_A 1 // value of convst bus to read channel A only
#define CH_AC 5 // value of convst bus to read channels A and C
#define CH_ABCD 15 // value of convst bus to read all chanels simultaneously
+#define MEAS_DELAY 1000 // measurement delay after turning on FET (us) (themocycling control programme uses 50 us)
+#define LOG_INTERVAL 1000 // log file interval (ms)
+
Serial pc(USBTX, USBRX); // tx, rx
@@ -102,7 +105,7 @@
for (int x=0; x<n_samples; x++) {
drive = 1;
yLED = 1;
- wait_ms(drivetime_ms);
+ wait_us(MEAS_DELAY);
readChannels (buffer16, val_array);
drive = 0;
yLED = 0;
@@ -120,7 +123,7 @@
sprintf(outString, "%5d\t %5d\t %5d\t %5d\t %f %5d\t %5d\t %5d\t %5d\t %f\r\n", val_array[0], val_array[1], val_array[4], val_array[5], r1, val_array[2], val_array[1], val_array[6], val_array[7], r2);
pc.printf("%s", outString);
- wait_ms(1000);
+ wait_ms(LOG_INTERVAL);
}