Library for reading temperature from DS1820, DS18B20 and DS1822

Dependencies:   LinkedList

Dependents:   heatmap BLE_Temperature BLE_Temperature_Exercise F334andDS18B20 ... more

Fork of DS1820 by David Pairman

HelloWorld: http://mbed.org/users/Sissors/code/DS1820_HelloWorld/

Library should currently work on all mbed targets, let me know if there is an issue. First however make sure you have latest version of mbed library and this library.

Revision:
8:d87e11e8d012
Parent:
7:58b61681818f
Child:
9:3821ca0b7f14
--- a/DS1820.cpp	Tue Apr 08 09:59:18 2014 +0000
+++ b/DS1820.cpp	Tue Jul 08 18:55:54 2014 +0000
@@ -51,11 +51,11 @@
     pin->write(0);
     wait_us(3);                 // DXP modified from 5
     if (bit_data) {
-        pin->input(); // bring data line high
+        pin->write(1); // bring data line high
         wait_us(55);
     } else {
         wait_us(55);            // keep data line low
-        pin->input();
+        pin->write(1);
         wait_us(10);            // DXP added to allow bus to float high before next bit_out
     }
 }