Sensor driver for the Adafruit MAX31855 thermocouple breakout.
More...
#include <Adafruit_MAX31855.h>
Sensor driver for the Adafruit MAX31855 thermocouple breakout.
◆ 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
-
_sclk | The pin to use for SPI Serial Clock. |
_cs | The pin to use for SPI Chip Select. |
_miso | The 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
-
_cs | The pin to use for SPI Chip Select. |
_spi | which spi buss to use. |
◆ 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
-
faults | Faults 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: