Adafruit MAX31855 Library
Public Member Functions | List of all members
Adafruit_MAX31855 Class Reference

Sensor driver for the Adafruit MAX31855 thermocouple breakout. More...

#include <Adafruit_MAX31855.h>

Public Member Functions

 Adafruit_MAX31855 (int8_t _sclk, int8_t _cs, int8_t _miso)
 Instantiates a new Adafruit_MAX31855 class using software SPI. More...
 
 Adafruit_MAX31855 (int8_t _cs, SPIClass *_spi=&SPI)
 Instantiates a new Adafruit_MAX31855 class using hardware SPI. More...
 
bool begin (void)
 Setup the HW. More...
 
double readInternal (void)
 Read the internal temperature. More...
 
double readCelsius (void)
 Read the thermocouple temperature. More...
 
double readFahrenheit (void)
 Read the thermocouple temperature. More...
 
uint8_t readError ()
 Read the error state. More...
 
void setFaultChecks (uint8_t faults)
 Set the faults to check when reading temperature. If any set faults occur, temperature reading will return NAN. More...
 

Detailed Description

Sensor driver for the Adafruit MAX31855 thermocouple breakout.

Constructor & Destructor Documentation

◆ Adafruit_MAX31855() [1/2]

Adafruit_MAX31855::Adafruit_MAX31855 ( int8_t  _sclk,
int8_t  _cs,
int8_t  _miso 
)

Instantiates a new Adafruit_MAX31855 class using software SPI.

Parameters
_sclkThe pin to use for SPI Serial Clock.
_csThe pin to use for SPI Chip Select.
_misoThe pin to use for SPI Master In Slave Out.

◆ Adafruit_MAX31855() [2/2]

Adafruit_MAX31855::Adafruit_MAX31855 ( int8_t  _cs,
SPIClass *  _spi = &SPI 
)

Instantiates a new Adafruit_MAX31855 class using hardware SPI.

Parameters
_csThe pin to use for SPI Chip Select.
_spiwhich spi buss to use.

Member Function Documentation

◆ begin()

bool Adafruit_MAX31855::begin ( void  )

Setup the HW.

Returns
True if the device was successfully initialized, otherwise false.

◆ readInternal()

double Adafruit_MAX31855::readInternal ( void  )

Read the internal temperature.

Returns
The internal temperature in degrees Celsius.

◆ readCelsius()

double Adafruit_MAX31855::readCelsius ( void  )

Read the thermocouple temperature.

Returns
The thermocouple temperature in degrees Celsius.

◆ readFahrenheit()

double Adafruit_MAX31855::readFahrenheit ( void  )

Read the thermocouple temperature.

Returns
The thermocouple temperature in degrees Fahrenheit.

◆ readError()

uint8_t Adafruit_MAX31855::readError ( )

Read the error state.

Returns
The error state.

◆ setFaultChecks()

void Adafruit_MAX31855::setFaultChecks ( uint8_t  faults)

Set the faults to check when reading temperature. If any set faults occur, temperature reading will return NAN.

Parameters
faultsFaults to check. Use logical OR combinations of preset fault masks: MAX31855_FAULT_OPEN, MAX31855_FAULT_SHORT_GND, MAX31855_FAULT_SHORT_VCC. Can also enable/disable all fault checks using: MAX31855_FAULT_ALL or MAX31855_FAULT_NONE.

The documentation for this class was generated from the following files: