Method of reading from DS1825 thermometer, including the OneWire method. Specific for the use of just 1 sensor.
Dependents: Inductive_Sensor Inductive_Sensor_Jasper Inductive_Sensor_3
Diff: DS1825.h
- Revision:
- 0:abb33be87221
- Child:
- 1:ef7e5efc8794
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/DS1825.h Thu Mar 24 16:26:24 2016 +0000 @@ -0,0 +1,30 @@ +#ifndef _DS1825_H +#define _DS1825_H + +/** +* @file DS1825.h +* @brief this header file will contain all required +* definitions for the functions to interface with the DS1825. +* +* @author Bob Giesberts +* +* @date 2016-03-23 +*/ + +#include "mbed.h" +#include "OneWire.h" + +class DS1825 { + public: + DS1825(PinName pin); + ~DS1825(); + float getTemperature(void); + OneWire *_onewire; + float T; + + private: + bool validateTemperature(uint8_t data[9]); + +}; + +#endif \ No newline at end of file