The source of dht11.c was taken from and modified to be used with wiringX. I was also using wiringX blinker example to do initial setup.
To compile and use:
- get the copy of wiringX, I was using rewrite branch
- get this repository
- adjust makefile to point to the wiringX directory
- say
make
I was testing it with bananaPI m2, so to execute I type
./dht11 bananapim2 1
~~~~~~
Note that data pin of the dht11 chip is connected to gpio 1. See the wiringX documentation to verify its match to the hardware pin 12.