IoT One Cloud has support for DHT11 and DHT22 devices to be used to sample both Humidity and Temperature. Note that these devices require the DHTXX and PIGPIOD programs to be installed and running. Visit this section for details on how to setup.
Now connect the DHT22 as shown
Note that there is a 10k resistor between power and data lines, this is to add some current to the data line in order for it to be delivered. It may not work properly otherwise.
Before adding the device to the hub with your client, you may wish to ensure correct connections and data. To do this, visit DHTXX Device Testing.
Now add the DHT22 device, either through temperature or humidity sensor screens. You will see something similar to the following:
Note you must fill out the path to the DHT22 compiled program, as done in the example from device setup. /home/pi/DHT22/DHTXXD
Further, be sure to put the BCM pin number where data is connected. This is the number from the breakout module(BCM), not the specific GPIO pin it’s plugged into.
Once these are uploaded, you will see the temperature sensor delivering information as shown:
Tigase IoT One Cloud is compatible with the DHT11 and DHT22 devices, they are similar and will both provide the same information however, the DHT22 provides slightly more accurate results, and allows for more frequent data transmission.
Field | DHT11 | DHT22 |
---|---|---|
Temp range | 0-50C | -40-80C |
Temp Accuracy | +/- 2C | +/- .5C |
Humidity range | 20-80% | 0-100% |
Humidity Accuracy | 5% | 2-5% |
Max Data Sample Rate | 1 Hz | .5 Hz |