one wire driver
Dependents: 09_PT1000 10_PT1000 11_PT1000
Diff: DS2482.cpp
- Revision:
- 5:d94037eb31ed
- Parent:
- 4:c29e67d55f86
--- a/DS2482.cpp Sat May 04 12:31:25 2013 +0000 +++ b/DS2482.cpp Sat Jul 26 07:27:00 2014 +0000 @@ -2,6 +2,7 @@ #include "mbed.h" #include "DS2482.h" +#include "monitor.h" extern Serial pc; @@ -1405,12 +1406,9 @@ ds1820_float_result = ds18B20_temp.word * 0.0625; - pc.printf("\nDS18B20 T-Kanal: %d = %2.2f ",ow.device_table_index,ds1820_float_result); + //pc.printf("\nDS18B20 T-Kanal: %d = %2.2f ",ow.device_table_index,ds1820_float_result); - ow.device_table[ow.device_table_index].result = (uint16_t)(ds1820_float_result * 10); - ow.device_table[ow.device_table_index].result += 300; - - pc.printf("\nTemperatur Kanal: %d = %d ",ow.device_table_index,ow.device_table[ow.device_table_index].result); + ow.device_table[ow.device_table_index].result = (int16_t)(ds1820_float_result * 100); // Clear flag to mark that no measurement is in progress ds1820_request_pending = false;