File tree Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -26,11 +26,11 @@ void setup() {
26
26
void loop () {
27
27
28
28
Serial.print (" ref " );
29
- Serial.print (THERM.readRefTemperature ());
29
+ Serial.print (THERM.readInternalTemperature ());
30
30
Serial.println (" °C" );
31
31
32
32
Serial.print (" celcius " );
33
- Serial.print (THERM.readCelsiusTemperature ());
33
+ Serial.print (THERM.readTemperature ());
34
34
Serial.println (" °C" );
35
35
36
36
Serial.println ();
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ float THERMClass::readTemperature()
86
86
rawword >>= 18 ;
87
87
}
88
88
// multiply for the LSB value
89
- celsius = rawword* 0 .25f ;
89
+ celsius = rawword * 0 .25f ;
90
90
91
91
return celsius;
92
92
}
Original file line number Diff line number Diff line change 22
22
#define _MKRTHERM_H_
23
23
24
24
25
- #include " Arduino.h"
25
+ #include < Arduino.h>
26
26
#include < SPI.h>
27
27
28
28
29
29
class THERMClass {
30
- private:
31
- uint32_t readSensor ();
32
-
33
- int _cs;
34
- SPIClass* _spi;
35
- SPISettings _spiSettings;
36
-
37
30
public:
38
31
THERMClass (int cs = A4, SPIClass& spi = SPI);
39
32
@@ -43,6 +36,14 @@ class THERMClass {
43
36
44
37
float readTemperature ();
45
38
float readInternalTemperature ();
39
+
40
+ private:
41
+ uint32_t readSensor ();
42
+
43
+ int _cs;
44
+ SPIClass* _spi;
45
+ SPISettings _spiSettings;
46
+
46
47
};
47
48
48
49
extern THERMClass THERM;
You can’t perform that action at this time.
0 commit comments