Skip to content

This program can't return correct temperature data when sub-zero temperature. #21

Description

@NaohikoYamaguchi

Hi,

I am Naohiko Yamaguchi from Japan.

Perhaps, this program can't return correct temperature data when sub-zero temperature.

Current code for calculate Temperature/Humidity is below.

 temperature = the_bytes[2] + float(the_bytes[3]) / 10
 humidity = the_bytes[0] + float(the_bytes[1]) / 10

DHT11 will return 1 in MSB of the_bytes[3] when sub-zero temperature.
However, current code is not support this specific.

Otherwise, am I wrong?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions