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: DS1820 ExtendedTimer SDFileSystem mbed
Fork of FindingTemp by
Revision 2:98ae1b36758e, committed 2017-07-31
- Comitter:
- htompkins20
- Date:
- Mon Jul 31 22:53:20 2017 +0000
- Parent:
- 1:a036633bc3c2
- Child:
- 3:1d8fca358781
- Commit message:
- Problem with SD card dismount
Changed in this revision
| DS1820.lib | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/DS1820.lib Mon Apr 17 20:32:43 2017 +0000 +++ b/DS1820.lib Mon Jul 31 22:53:20 2017 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/users/Sissors/code/DS1820/#236eb8f8e73a +http://developer.mbed.org/teams/Whitworth-EN173-Resources/code/DS1820/#00ec4f27d7f5
--- a/main.cpp Mon Apr 17 20:32:43 2017 +0000
+++ b/main.cpp Mon Jul 31 22:53:20 2017 +0000
@@ -21,7 +21,7 @@
DS1820* probeTail[20];
SDFileSystem fs(p5, p6, p7, p8, "fs");
Serial pc(USBTX,USBRX);
-
+DigitalIn stopMeOrElse(p21);
int main()
{
@@ -30,6 +30,7 @@
float lastMeasurement = 0;
float measurementInterval = 30;
+ pc.printf("Let's do science!\r\n");
// Mount the filesystem
bool mountFailure = fs.mount();
if (mountFailure != 0) {
@@ -133,7 +134,7 @@
//start collecting data
- while(t.read()<4*60*60) {
+ while((t.read()<4*60*60) && (!stopMeOrElse)) {
//conditional statement to trigger sensor readings
if ((t.read()-lastMeasurement)>measurementInterval) {
lastMeasurement = t.read();
@@ -172,6 +173,7 @@
//flushing io buffer
}
+ pc.printf("It has been good to do science.\r\n");
fclose(outputt);
fclose(output1);
fclose(output2);
