Skip to content

Documentation: Enable the temperature sensor #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 29, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/TheThingsNode.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Usage:
```c
void setup() {
node = TheThingsNode::setup();

node->onWake(wake);
}

Expand All @@ -72,7 +72,7 @@ Usage:
```c
void setup() {
node = TheThingsNode::setup();

node->onSleep(sleep);
}

Expand All @@ -87,10 +87,10 @@ Instead of using your `loop()` function, use `configInterval()` and `onInterval(
```c
void setup() {
node = TheThingsNode::setup();

// Call every 30s instead of the default 60
node->configInterval(true, 30000);

node->onInterval(interval);
}

Expand Down Expand Up @@ -193,15 +193,15 @@ void configTemperature(bool enabled, MCP9804_Resolution resolution);
void configTemperature(bool enabled);
```

- `bool enabled `: Enable or disable temperature alerts. Enabled automatically by `onTemperature()`, but you can use this method to temporarily disable the alerts. Defaults to `false`.
- `bool enabled `: Enable or disable the temperature sensor. Enabled automatically by `onTemperature()`, but you can use this method to temporarily disable the sensor and therefore the alerts. Defaults to `false`.
- `MCP9804_Resolution resolution = R_DEGREES_0_0625 `: Set the resolution (precision) of the sensor. One of:
- `R_DEGREES_0_5000`: +0.5 C
- `R_DEGREES_0_2500`: +0.25 C
- `R_DEGREES_0_1250`: +0.125 C
- `R_DEGREES_0_0625`: +0.0625 (default)

See the sensor's [data sheet, section 5.2.4](http://ww1.microchip.com/downloads/en/DeviceDoc/22203C.pdf) for more details.

- `int8_t lower`: Alert when temperature in Celsius is lower. Defaults to `0`.
- `int8_t upper`: Alert when temperature in Celsius is higher. Defaults to `30`.
- `int8_t critical = 55`: Alert when temperature in Celsius is higher. Defaults to `55`, above which you run the risk of battery failure.
Expand Down