|
@@ -2,7 +2,7 @@ Making a UPM module for MAX31855 {#max31855}
|
2
|
2
|
================================
|
3
|
3
|
|
4
|
4
|
The Maxim Integrated MAX31855 is a thermocouple amplifier allowing you to read
|
5
|
|
-from a K type themocouple. My board comes from the Pmod kit form Maxim
|
|
5
|
+from a K type thermocouple. My board comes from the Pmod kit form Maxim
|
6
|
6
|
(MAX31855PMB1) but you can get this from many different sources. The adafruit
|
7
|
7
|
people made arduino code already so we'll use that as a
|
8
|
8
|
[reference](https://github.com/adafruit/Adafruit-MAX31855-library/blob/master/Adafruit_MAX31855.cpp).
|
|
@@ -69,7 +69,7 @@ the implementation of MAX31855::getTemp()
|
69
|
69
|
|
70
|
70
|
Then using the arduino code as reference we simply reconstruct form the 4
|
71
|
71
|
uint8_t values a 32bit int value and select only the valuable parts of
|
72
|
|
-information from that. The MAX31855 datahseet explains exactly which bits are
|
|
72
|
+information from that. The MAX31855 datasheet explains exactly which bits are
|
73
|
73
|
useful, we will just do the same as the adafruit code, first checking the error
|
74
|
74
|
bit and then scrapping everything but the 14bit of thermocouple data that are
|
75
|
75
|
useful to us and converting it to a double.
|
|
@@ -78,7 +78,7 @@ useful to us and converting it to a double.
|
78
|
78
|
|
79
|
79
|
### Finalizing
|
80
|
80
|
|
81
|
|
-Our final example, very easy to use api!
|
|
81
|
+Our final example, very easy to use API!
|
82
|
82
|
|
83
|
83
|
@snippet examples/max31855.cxx Interesting
|
84
|
84
|
|
|
@@ -92,6 +92,6 @@ include_directories (${PROJECT_SOURCE_DIR}/src/max31855)
|
92
|
92
|
target_link_libraries (max31855-example max31855 ${CMAKE_THREAD_LIBS_INIT})
|
93
|
93
|
~~~~~~~~~~~
|
94
|
94
|
|
95
|
|
-Note you dont have to rebuild everything, cmake keeps target lists so if you
|
|
95
|
+Note you don't have to rebuild everything, cmake keeps target lists so if you
|
96
|
96
|
named your example target modulename-example you can simply do make
|
97
|
97
|
max31855-example and both the library & example will build.
|