I think the code above has bugs with the negative calculations. I based my node off this from https://github.com/KeitetsuWorks/DS3231_Temperature/blob/master/DS3231/src/DS3231.c instead:

```
temperature_work = (
(temperature_msb & 7Fh)
+ (0.25 * ((temperature_lsb & C0h) >> 6)));
if((temperature_msb & 80h) != 0) {
temperature_work *= -1;
}
```

For LSB calculation, it is redundant to bit mask out the 1st 6 bits, then shift, then divide by 4 (which is what *0.25 is doing). I masked out the extra bits, then divided by 256, which is the same thing if my calculations are correct…

At the end, we multiply by 1 or -1. If the 80h bit of of MSB is set, then the number is negative, so we multiply by -1, else we multiply by 1 so the number is unchanged.

Temperature should be in Celsius.

I don’t have hardware to test with, but this code comes with a money back guarantee…I guarantee you won’t get any money back

Here is my suggestion for a new read-temperature node:

The triangle nodes in this example are to-bus & from-bus nodes. They basically provide invisible wires to link same-named nodes so I could wire back to the top of the page without crossing wires through the whole patch (the same as the I2C and ADDR busses already on the original “read” node). I started with the xod-dev/ds-rtc/read node mentioned previously, deleted the extra read nodes and the nodes below them. I don’t know if the “defer” node before “DONE” is needed; the intent is to make sure temperature calculations are done before the DONE pin is pulsed.