Library for MAX31855. Based on MAX6675 library. I have only implemented the temperature reading. The chip supports also the reading of internal reference temperature and faults for shorted thermocouple and shorts to vcc/gnd.
Diff: MAX31855.h
- Revision:
- 0:a07644a18427
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MAX31855.h Sat Mar 10 19:30:40 2012 +0000 @@ -0,0 +1,25 @@ +#ifndef MAX31855_h +#define MAX31855_h + +#include "mbed.h" + +class MAX31855 +{ + SPI& spi; + DigitalOut ncs; + public: + + MAX31855(SPI& _spi, PinName _ncs); + void select(); + void deselect(); + + float read_temp(); + private: + PinName _CS_pin; + PinName _SO_pin; + PinName _SCK_pin; + int _units; + float _error; +}; + +#endif \ No newline at end of file