ds18b20 for senior design

Dependencies:   mbed

Fork of ds18b20_test by Tuan PM

Files at this revision

API Documentation at this revision

Comitter:
jchari
Date:
Tue Nov 17 21:55:04 2015 +0000
Parent:
1:10bbb8a13329
Commit message:
So committed

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 10bbb8a13329 -r b369cd116bf1 main.cpp
--- a/main.cpp	Thu Mar 27 17:26:59 2014 +0000
+++ b/main.cpp	Tue Nov 17 21:55:04 2015 +0000
@@ -3,8 +3,8 @@
 
 Serial pc(SERIAL_TX, SERIAL_RX);
 
-const int MAX_PROBES = 3;
-DS1820 probe[3] = {D2, D2, D2};
+const int MAX_PROBES = 1;
+DS1820 probe[1] = {A0};
 
 
 int main()
@@ -31,8 +31,8 @@
     while(1) {
         probe[0].convert_temperature(DS1820::all_devices);
         for (i=0; i<devices_found; i++) {
-            pc.printf("Device[%d]: %3.1f \r\n",i, probe[i].temperature('c'));
+            pc.printf("Device[%d]: %3.1f \r\n",i, probe[i].temperature('f'));
         }
-        wait(1.0); // 1 sec
+        wait(1); // 1 sec
     }
 }
diff -r 10bbb8a13329 -r b369cd116bf1 mbed.bld
--- a/mbed.bld	Thu Mar 27 17:26:59 2014 +0000
+++ b/mbed.bld	Tue Nov 17 21:55:04 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/ed8466a608b4
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/34e6b704fe68
\ No newline at end of file