библиотека для подключения модуля термопары к микроконтроллеру
Dependents: NUCLEO_F410RB_MAX6675 PanelaSTM
Fork of max6675 by
Diff: max6675.h
- Revision:
- 0:b49d36e03092
- Child:
- 4:f0cdf38c7cfc
diff -r 000000000000 -r b49d36e03092 max6675.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/max6675.h Sat May 15 06:26:05 2010 +0000 @@ -0,0 +1,25 @@ +#ifndef MAX6675_h +#define MAX6675_h + +#include "mbed.h" + +class max6675 +{ + SPI& spi; + DigitalOut ncs; + public: + + max6675(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