File tree Expand file tree Collapse file tree 2 files changed +17
-16
lines changed Expand file tree Collapse file tree 2 files changed +17
-16
lines changed Original file line number Diff line number Diff line change 1
1
//
2
2
// FILE: MAX31855.cpp
3
3
// AUTHOR: Rob Tillaart
4
- // VERSION: 0.1.03
4
+ // VERSION: 0.1.04
5
5
// PURPOSE: MAX31855 - Thermocouple
6
6
// DATE: 2014-01-01
7
7
// URL:
8
8
//
9
9
// HISTORY:
10
+ // 0.1.04 2015-03-09 replaced float -> double (ARM support)
10
11
// 0.1.03 fixed negative temperature
11
12
// 0.1.02 added offset
12
13
// 0.1.01 refactored speed/performance
Original file line number Diff line number Diff line change 1
- #ifndef MAX31855_H
2
- #define MAX31855_H
3
1
//
4
2
// FILE: MAX31855.h
5
3
// AUTHOR: Rob Tillaart
6
- // VERSION: 0.1.03
4
+ // VERSION: 0.1.04
7
5
// PURPOSE: MAX31855 - Thermocouple
8
6
// DATE: 2014-01-01
9
7
// URL:
10
8
//
11
9
// Released to the public domain
12
10
//
11
+ #ifndef MAX31855_H
12
+ #define MAX31855_H
13
13
14
14
#if (ARDUINO < 100)
15
15
#include " WProgram.h"
16
16
#else
17
17
#include " Arduino.h"
18
18
#endif
19
19
20
- #define MAX31855_VERSION " 0.1.03 "
20
+ #define MAX31855_VERSION " 0.1.04 "
21
21
22
22
#define STATUS_OK 0x00
23
23
#define STATUS_OPEN_CIRCUIT 0x01
@@ -29,22 +29,22 @@ class MAX31855
29
29
public:
30
30
MAX31855 (uint8_t SCLK, uint8_t CS, uint8_t MISO);
31
31
void begin ();
32
+
32
33
uint8_t read ();
33
- float getInternal (void ) { return _internal; };
34
- // Celsius
35
- float getTemperature (void ) { return _temperature; };
36
- uint8_t getStatus (void ) {return _status; };
37
34
38
- void setOffset (float t) { _offset = t; };
39
- float getOffset (float t) { return _offset; };
35
+ double getInternal (void ) { return _internal; };
36
+ double getTemperature (void ) { return _temperature; };
37
+ uint8_t getStatus (void ) { return _status; };
40
38
39
+ void setOffset (double t) { _offset = t; };
40
+ double getOffset () { return _offset; };
41
41
42
42
private:
43
- uint32_t _read ();
44
- float _internal;
45
- float _temperature;
43
+ uint32_t _read ();
44
+ double _internal;
45
+ double _temperature;
46
46
uint8_t _status;
47
- float _offset;
47
+ double _offset;
48
48
49
49
uint8_t _sclk;
50
50
uint8_t _miso;
@@ -53,4 +53,4 @@ class MAX31855
53
53
54
54
#endif
55
55
56
- // END OF FILE
56
+ // END OF FILE
You can’t perform that action at this time.
0 commit comments