KIT Solar Car Project / Mbed 2 deprecated mbed_MAX6675_4_LM61_SD

Dependencies:   mbed SDFileSystem

max6675.h

Committer:
BoostNori
Date:
2020-03-02
Revision:
0:cb620b090bf4

File content as of revision 0:cb620b090bf4:

#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