Skip to content

Commit

Permalink
Chore: better naming
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Perestoronin committed Jan 16, 2020
1 parent 13ad4f6 commit f10e5fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ See [Measuring the temperature with NTCs](http://www.giangrandi.ch/electronics/n

Damn them! 😡

1. Supposingly, one has to solder out the second sensor deep inside the thermostat **even before turning it on for the first time**. If you've already done that, you may try to figure out the calibrated temperature shift that the thermostat has calculated and remembered. Wait ~4 minutes and note the difference between displayed and real temperatures. Then, change `livoloShift` in the source code to compensate this.
1. Supposingly, one has to solder out the second sensor deep inside the thermostat **even before turning it on for the first time**. If you've already done that, you may try to figure out the calibrated temperature shift that the thermostat has calculated and remembered. Wait ~4 minutes and note the difference between displayed and real temperatures. Then, change `livoloOffset` in the source code to compensate this.
2. Livolo's 1-Wire master has non-standard timings and does not read all the data transmitted. You'll need to patch OneWireHub's `OneWireHub_config.h` and `DS18B20.cpp` using the included `livolo.patch`. See also https://github.com/orgua/OneWireHub/issues/84.
6 changes: 3 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ auto ds18b20 = DS18B20(0x28, 0x92, 0x23, 0xC5, 0x1E, 0x19, 0x01); // Copied from
constexpr uint8_t ledPin = 13;

// Livolo thermostat performs some calibration.
// This is the temperature shift we apply to match the actual temperature.
constexpr float livoloShift = +3.0f;
// This is the temperature offset we apply to match the actual temperature.
constexpr float livoloOffset = +3.0f;

void setup() {
// I've never experienced a freeze on `hub.poll()`, but just in case enabling 8 seconds WDT.
Expand Down Expand Up @@ -67,7 +67,7 @@ void loop() {
nextMillis = millis() + interval;

const auto reading = readTemperature(adcPin);
ds18b20.setTemperature(reading + livoloShift);
ds18b20.setTemperature(reading + livoloOffset);

Serial.print(millis());
Serial.print(" ms | ");
Expand Down

0 comments on commit f10e5fc

Please sign in to comment.