University of Plymouth - Stages 1, 2 and 3
/
Task436Solution
Task 4.3.6 Solution
Fork of Task436Solution by
Revision 2:3f65535dbccf, committed 2019-09-18
- Comitter:
- noutram
- Date:
- Wed Sep 18 13:56:18 2019 +0000
- Parent:
- 1:5459989f0fbc
- Commit message:
- 2019; Fixed sampling rate
Changed in this revision
--- a/main.cpp Thu Jul 13 14:54:37 2017 +0000 +++ b/main.cpp Wed Sep 18 13:56:18 2019 +0000 @@ -39,6 +39,7 @@ //Print header pc.printf("POT,LDR,avPOT, acLDR\n\n"); + wait(0.5); //Set up the ticker - 100Hz t.attach(doCaptureSamples, 0.01); @@ -62,6 +63,7 @@ //Write to terminal via Serial interface int middle = (indexOfOldest - (N/2)) % N; pc.printf("%6.4f,%6.4f,%6.4f,%6.4f\n", xPOT[middle], xLDR[middle], fPOTSum/(float)N, fLDRSum/(float)N); + wait(0.0021); //Allow send time for 30 characters (at 115200 bits / s, 14,400 bytes / s) //Check the threshold if (fLDRSum > fPOTSum) {
--- a/mbed-os.lib Thu Jul 13 14:54:37 2017 +0000 +++ b/mbed-os.lib Wed Sep 18 13:56:18 2019 +0000 @@ -1,1 +1,1 @@ -https://github.com/ARMmbed/mbed-os/#8828635da469162cf2854b5287561c663fb96e72 +https://github.com/ARMmbed/mbed-os/#1bf6b20df9d3cd5f29f001ffc6f0d0fcbbb96118
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed_app.json Wed Sep 18 13:56:18 2019 +0000 @@ -0,0 +1,3 @@ +{ + "requires": ["bare-metal"] +} \ No newline at end of file