Skip to content

Commit c755717

Browse files
authored
Merge pull request #8 from canchebagur/add-docs
Add docs folder
2 parents 29cb083 + 770952f commit c755717

File tree

2 files changed

+142
-0
lines changed

2 files changed

+142
-0
lines changed

docs/api.md

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# Arduino MKR THERM library
2+
3+
## Methods
4+
5+
### `begin()`
6+
7+
Initialize the sensor connected to the shield.
8+
9+
#### Syntax
10+
11+
```
12+
THERM.begin()
13+
```
14+
15+
#### Parameters
16+
17+
None.
18+
19+
#### Returns
20+
21+
1 on success, 0 on failure.
22+
23+
#### Example
24+
25+
```
26+
if (!THERM.begin()) {
27+
Serial.println("Failed to initialize MKR THERM shield!");
28+
while (1);
29+
}
30+
```
31+
32+
#### See also
33+
34+
* [end()](#end)
35+
* [readTemperature()](#readTemperature)
36+
* [readReferenceTemperature()](#readReferenceTemperature)
37+
38+
### `end()`
39+
40+
De-initialize the sensor connected to the shield.
41+
42+
#### Syntax
43+
44+
```
45+
THERM.end()
46+
```
47+
48+
#### Parameters
49+
50+
None.
51+
52+
#### Returns
53+
54+
None.
55+
56+
#### Example
57+
58+
```
59+
THERM.end();
60+
```
61+
62+
#### See also
63+
64+
* [begin()](#begin)
65+
* [readTemperature()](#readTemperature)
66+
* [readReferenceTemperature()](#readReferenceTemperature)
67+
68+
### `readTemperature()`
69+
70+
Read the thermocouple’s hot junction (its tip) temperature value.
71+
72+
#### Syntax
73+
74+
```
75+
THERM.readTemperature()
76+
```
77+
78+
#### Parameters
79+
80+
None.
81+
82+
#### Returns
83+
84+
The thermocouple’s hot junction temperature value in degrees Celsius.
85+
86+
#### Example
87+
88+
```
89+
Serial.print("Temperature = ");
90+
Serial.print(THERM.readTemperature());
91+
Serial.println(" °C");
92+
```
93+
94+
#### See also
95+
96+
* [begin()](#begin)
97+
* [end()](#end)
98+
* [readReferenceTemperature()](#readReferenceTemperature)
99+
100+
### `readReferenceTemperature()`
101+
102+
Read the thermocouple’s cold junction (the connection between the wire of the thermocouple and the connector or the screw terminal) temperature value. This value is used to compensate the temperature reading of the themocouple's hot junction.
103+
104+
#### Syntax
105+
106+
```
107+
THERM.readReferenceTemperature()
108+
```
109+
110+
#### Parameters
111+
112+
None.
113+
114+
#### Returns
115+
116+
The thermocouple’s cold junction temperature value in degrees Celsius.
117+
118+
#### Example
119+
120+
```
121+
Serial.print("Reference temperature = ");
122+
Serial.print(THERM.readReferenceTemperature());
123+
Serial.println(" °C");
124+
```
125+
126+
#### See also
127+
128+
* [begin()](#begin)
129+
* [end()](#end)
130+
* [readTemperature()](#readTemperature)

docs/readme.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Arduino MKR THERM library
2+
3+
4+
The Arduino MKR THERM library allows you to manage a thermocouple attached to the MKR THERM Shield with a type k connector or with screw terminals. This library manages the MAX31855 chip of the MKR THERM Shield.
5+
6+
The functions available in the library are just two. They allows you to read the temperature of the hot junction of the thermocouple (the tip of the thermocouple) and also the temperature of the cold junction (the connection between the wire of the thermocouple and the connector or the screw terminal). The temperature value of the cold junction is used to give a compensated value of the current measured at the hot junction. This current is then converted into a temperature value.
7+
8+
To use this library:
9+
10+
```
11+
#include <Arduino_MKRTHERM.h>
12+
```

0 commit comments

Comments
 (0)