Update dht22.c
Update dht22.c

Refactored the code a bit to fixed a few issues (input pin handling did not work) and made it a bit easier to use.
Seeed-Studio/Grove-RaspberryPi,Seeed-Studio/Grove-RaspberryPi,Seeed-Studio/Grove-RaspberryPi