Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 823 Bytes

README.md

File metadata and controls

22 lines (16 loc) · 823 Bytes

DHT11

Read data from DHT11 sensor with error checking and retries.

Files:
read_DHT11.c - the C source code
read_DHT11 - the binary code
Compiled on RPi3B+ Linux 4.19 with "gcc -o read_DHT11 read_DHT11.c -lwiringPi -lwiringPiDev" command

Details of operation:
Run "sudo ./read_DHT11" with wPi (wiringPi) PIN number parameter like: "sudo ./read_DHT11 2".
Because the read is very sensitive for CPU loads, the data integrity check is required. When read error detected, then after 2 seconds wait retry the read. After 4 retry exit with error (in tests never reached this limit :-)

Requirements:
WiringPi must be installed.

Install:
Copy binary code to /usr/bin/ and use it.

Tested environment:
RPi3B+