Skip to content
This repository was archived by the owner on Sep 30, 2019. It is now read-only.
This repository was archived by the owner on Sep 30, 2019. It is now read-only.

Solution for long cable on DHT22/11  #161

@internermitarbeiter

Description

@internermitarbeiter

Hello,
I recognized, that if I use a cable longer than 3m the Adafriut_DHT can't communicate with the sensor.

The reason is in the pi_2_dht_read function.

Receive sequence long cable:
2 219 724 754 483 236 513 226 513 236 505 236 513 219 513 236 505 682 505 672 631 236 513 218 513 236 478 682 503 680 505 235 511 674 513 664 632 236 512 236 505 236 505 225 513 234 484 236 513 226 513 227 631 682 505 235 513 674 513 228 512 228 505 236 513 214 513 643 612 672 513 236 505 682 505 682 504 681 505 682 504 682 495 670 419 0 0 0 0 0 0 0
Receive sequence short cable:
723 763 503 236 500 245 501 245 503 244 502 244 503 234 503 688 503 668 629 245 486 245 501 690 501 244 503 245 501 242 503 688 503 678 628 244 503 244 490 245 496 235 503 245 501 244 503 243 503 235 627 245 503 688 502 688 501 244 503 678 503 667 503 688 502 236 599 688 503 244 501 245 503 688 500 245 501 689 491 244 493 229 437 0 0 0 0 0 0 0 0 0

You see, that the beginning is a bit noisy (Offset +2). I think it's better to search from the end. I modify the "pi_2_dht_read(…)" and it works fine now.

By.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions