You are reading a single comment by @possmann and its replies. Click here to read the full conversation.
  • @Gordon: so now i have a comparison.

    This is the output from the SparkCore which also use the DallasTemperature library (https://github.com/tomdeboer/SparkCoreDa­llasTemperature).

    value 0 -> alarm off
    value 1 -> alarm on
    ----------------------------------------­-
    Temp for Sensor A: 26.25  ->  1
    Temp for Sensor A: 26.31  ->  1
    Temp for Sensor A: 25.56  ->  1
    Temp for Sensor A: 24.56  ->  0
    Temp for Sensor A: 23.75  ->  0
    Temp for Sensor A: 23.00  ->  0
    Temp for Sensor A: 22.31  ->  0
    Temp for Sensor A: 21.75  ->  0
    Temp for Sensor A: 21.31  ->  0
    Temp for Sensor A: 20.81  ->  1
    Temp for Sensor A: 20.44  ->  1
    Temp for Sensor A: 20.06  ->  1
    Temp for Sensor A: 19.75  ->  1
    Temp for Sensor A: 19.44  ->  1
    

    I set the temperature range between 20° and 25°. So we have the same issue. I guess it's a bug or feature of the sensor :-) It seems that the alarm recognize only floor values.

    Additionally i read the specification and found the definition:
    (http://datasheets.maximintegrated.com/en­/ds/DS18B20.pdf -> page 4 at the last paragraph)

    If the measured temperature is lower than or equal to TL or higher
    than or equal to TH, an alarm condition exists and an alarm flag is
    set inside the DS18B20

    Hmmm, but what would be the right way now? Somehow, I am not happy with a subtraction of the minimal value, but that would be a simple and quick solution.

    What do you think?

About

Avatar for possmann @possmann started