Now supports DS18B20 and DS18S20 Maxim/Dallas one-wire thermometer devices. Also supports DS18S20 in 9, 10, 11, and 12 bit resolution modes. 'Use Address' mode now checks if the correct device type is present, and informs the user which device to use. Correct temperature conversion times now used in non-parasitic mode. The device should be placed at least 6 inches (15 cm) from the mbed board in order to accurately read ambient temperature.

Dependencies:   mbed

Fork of OneWireCRC by Petras Saduikis

Revision:
1:ade3fad22621
Parent:
0:01a6a40578c9
--- a/DS18B20.cpp	Sun Jan 03 11:57:31 2010 +0000
+++ b/DS18B20.cpp	Mon Jul 13 17:22:49 2015 +0000
@@ -95,7 +95,7 @@
             pc_ds18B20.traceOut("12 bit resolution ...\r\n");
             break;
     }
-    float realTemp = (float)read_temp/16 ;
+    float realTemp = (float)read_temp/16*9/5+32 ;
                  
     pc_ds18B20.traceOut("TEMP_READ/REAL TEMP: %f \r\n", realTemp);