st-anything/lib/Adafruit_MAX31885/Adafruit_MAX31855.h

45 lines
1.1 KiB
C
Raw Normal View History

2023-03-11 14:11:03 +00:00
/***************************************************
This is a library for the Adafruit Thermocouple Sensor w/MAX31855K
Designed specifically to work with the Adafruit Thermocouple Sensor
----> https://www.adafruit.com/products/269
These displays use SPI to communicate, 3 pins are required to
interface
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried/Ladyada for Adafruit Industries.
BSD license, all text above must be included in any redistribution
****************************************************/
#ifndef ADAFRUIT_MAX31855_H
#define ADAFRUIT_MAX31855_H
#if (ARDUINO >= 100)
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
class Adafruit_MAX31855 {
public:
Adafruit_MAX31855(int8_t _sclk, int8_t _cs, int8_t _miso);
Adafruit_MAX31855(int8_t _cs);
void begin(void);
double readInternal(void);
double readCelsius(void);
double readFarenheit(void);
uint8_t readError();
private:
boolean initialized;
int8_t sclk, miso, cs;
uint32_t spiread32(void);
};
#endif