-
Notifications
You must be signed in to change notification settings - Fork 1
/
Adafruit_MAX31855.h
42 lines (33 loc) · 1.13 KB
/
Adafruit_MAX31855.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/***************************************************
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);
double readInternal(void);
double readCelsius(void);
double readFarenheit(void);
uint8_t readError();
private:
int8_t sclk, miso, cs, hSPI;
uint32_t spiread32(void);
uint32_t hspiread32(void);
};
#endif