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:
4:29264b0a2c9f
Parent:
3:8f2b7f4940b5
Child:
5:2cd4928e8147
--- a/DS1820.cpp	Thu Aug 01 10:18:17 2013 +0000
+++ b/DS1820.cpp	Wed Aug 07 11:02:10 2013 +0000
@@ -151,7 +151,10 @@
             if (ROM_bit_index != 0xFF) {
                 for(byte_counter=0;byte_counter<8;byte_counter++)
                     ROM[byte_counter] = DS1820_search_ROM[byte_counter];
-                return_value = true;
+                if (ROM_checksum_error())           // Check the CRC
+                    DS1820_last_descrepancy = 0;    // Abort any more search
+                else
+                    return_value = true;
             }
         }
         if (DS1820_last_descrepancy == 0)