ss

Dependencies:   mbed MPU6050

Committer:
SantiagoE
Date:
Mon Feb 22 19:24:30 2021 +0000
Revision:
0:ac37887d5bb2
ss

Who changed what in which revision?

UserRevisionLine numberNew contents of line
SantiagoE 0:ac37887d5bb2 1 #ifndef MAX6675_h
SantiagoE 0:ac37887d5bb2 2 #define MAX6675_h
SantiagoE 0:ac37887d5bb2 3
SantiagoE 0:ac37887d5bb2 4 #include "mbed.h"
SantiagoE 0:ac37887d5bb2 5
SantiagoE 0:ac37887d5bb2 6 class max6675
SantiagoE 0:ac37887d5bb2 7 {
SantiagoE 0:ac37887d5bb2 8 SPI& spi;
SantiagoE 0:ac37887d5bb2 9 DigitalOut ncs;
SantiagoE 0:ac37887d5bb2 10 public:
SantiagoE 0:ac37887d5bb2 11
SantiagoE 0:ac37887d5bb2 12 max6675(SPI& _spi, PinName _ncs);
SantiagoE 0:ac37887d5bb2 13 void select();
SantiagoE 0:ac37887d5bb2 14 void deselect();
SantiagoE 0:ac37887d5bb2 15
SantiagoE 0:ac37887d5bb2 16 float read_temp();
SantiagoE 0:ac37887d5bb2 17 private:
SantiagoE 0:ac37887d5bb2 18 PinName _CS_pin;
SantiagoE 0:ac37887d5bb2 19 PinName _SO_pin;
SantiagoE 0:ac37887d5bb2 20 PinName _SCK_pin;
SantiagoE 0:ac37887d5bb2 21 int _units;
SantiagoE 0:ac37887d5bb2 22 float _error;
SantiagoE 0:ac37887d5bb2 23 };
SantiagoE 0:ac37887d5bb2 24
SantiagoE 0:ac37887d5bb2 25 #endif