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
Diff: 2021fork3/presens.cpp
- Revision:
- 2:4603eae79fb6
- Parent:
- 1:eac9f7a0488f
--- a/2021fork3/presens.cpp Wed Mar 10 21:09:24 2021 +0000
+++ b/2021fork3/presens.cpp Thu Jun 23 19:33:33 2022 +0000
@@ -76,6 +76,8 @@
presenseComm.printf("tmpc2000\r");
wait(PRESENS_CONFIG_DELAY);
+ // presenseComm.printf("mode0000\r");
+ // wait(PRESENS_CONFIG_DELAY);
}
@@ -87,7 +89,7 @@
int PRESENS_FLOAT_LENGTH = 7;
presenseComm.printf("data\r");
- wait(0.3);
+ wait(0.2);
adcGetData();
wait(0.1);
@@ -99,7 +101,7 @@
}
- L3=1;
+ L3 = 1;
// read the each data packet
@@ -118,9 +120,13 @@
presenseComm.getc();
presenseComm.getc();
+ //this wait seems to cure the chart stutter that was happening with the new Presens board
+ wait(0.55);
L4=1;
+// wait(0.05);
+
PRESENS_FLOAT_LENGTH = 4;
phase = presensReadFloat(PRESENS_FLOAT_LENGTH) / 100;
@@ -133,12 +139,12 @@
while(presenseComm.readable()) {
presenseComm.getc();
}
-
+ wait(0.05);
// end of the data extraction
- L3=1;
+// L3=1;
DEBUG1("Amplitude=%5.0f Phase=%5.2f", amplitude, phase);
@@ -157,7 +163,7 @@
DEBUG1("Result array:amplitude=%5.0f, phase=%2.2f, OxsenseData=%3.3f", amplitude, phase, result[2]);
- L3=0;
+// L3=0;
L4=0;
}