There are several projects on the web for these inexpensive DHT11 & DHT22 modules. The AM2302 is essentially the DHT22 inside an enclosure.
For my project I had planed to utilize the DHT addon program in the HG Package manager however the code is out dated and throws errors.
As well when looking for ways to fix the errors I discovered many were saying the C sharp library for these was unreliable. Since the sensors themselves can be unreliably accurate this seemed problematic.
The readings don't have to be dead accurate for my initial use but they need to be there.
I found several of the web examples using python2 or python3 and the Adafruit_DHT libraries so I tested A few out.
Some examples I couldn't get to work but these two did
DHT22 or
DHT11I didn't wish to use a breadboard but wished to connect directly to the GPIO pins with Jumper wires. The sensors attached to a small circuit board like ones shown it the attachments work great this way. The AM2302 sensor has that board inside with wires attached. those wires were just the right diameter to fit in the jumper wires.
Since the code worked fine in the command line I went about trying to put something together in HG using the IronPython scripting for the HG Programs. I encountered a couple of issues one (pulling in a library from another location) I was able to resolve the next issue was the Iron Python code got the same error I got with python script while trying to run a DHT22.
It seemed Like I was going in circles
Looking at Java I discovered it isn't suited for this type of operation thus no library for using the sensors.
I decided to make a HG program using a C sharp script to run the python3 script and pass the info to a HG widget.
The short story is I got that to work with the HG sensor widget.
My primary reasoning for setting up a sensor was for my off grid place so I can check and see the inside temperature, seeing the inside humidity is just a bonus. Next I wanted to expand on this new HG add on Program to turn off/on (at least) modules based on values from the sensor. Not being at the place now I couldn't think of anything use other then just informational, but may be in the city place.
I have a portable humidifier so this seemed like one thing I could use the humidity reading for. My computer room gets very dry in the winter months and a pellet stove doesn't help. I guess if my office was still in the basement it could be used to trigger a dehumidifier
I have a couple of those ceramic heaters which My wife has been trying to get me to use in my computer room. Seems like I found a use for the temperature value.
Since I figured I may find other uses I added code so any module in HG could be triggered from these values. I used less then and greater then the values to limit the triggering.
This has been working great for the last couple of days as is.
I have a few more tweaks I wish to to do the HG program so once those are done & been tested I'll post the program in the
PiX10HuB/General/User created HG script section.
The Program works for any of the modules pictured below but is currently hard coded for GPIO pin 4. I plan to make that a selectable option before posting the program.