lib for realteimMM funcs

Revision:
3:13301255d95a
Parent:
0:9f82ee1feae7
--- a/sensor_base.h	Mon Oct 02 11:18:47 2017 +0000
+++ b/sensor_base.h	Thu Feb 15 16:35:50 2018 +0000
@@ -107,6 +107,36 @@
     char data_sample[50];
 };
 
+class sensor_max6675 //: public sensor_base
+{
+    SPI spi;
+    DigitalOut ncs;
+        
+public:
+
+    int sensor_id;
+    int sensor_type;
+    bool enabled;
+    
+    //sensor_max6675();
+    //sensor_max6675(PinName _cs, PinName _so, PinName _sck, PinName _ncs);
+    sensor_max6675(SPI _spi, PinName _ncs);
+    ~sensor_max6675();
+    void select();
+    void deselect();    
+    float read_temp();
+    
+    virtual char * read_data();
+    char data_sample[50];
+
+  private:
+    //PinName _CS_pin;
+    //PinName _SO_pin;
+    //PinName _SCK_pin;
+    int _units;
+    float _error;
+    
+};
 
 /*
 class Counter {