![adafruit trinket hc-05 adafruit trinket hc-05](https://rydepier.files.wordpress.com/2015/05/img_1926.png)
#Adafruit trinket hc 05 how to
#Adafruit trinket hc 05 install
Follow these steps to install the DHT sensor library: Now let’s see how to install the DHT library in Arduino. We have an Arduino library for DHT sensors which can be easily used to get values of temperature and humidity only by calling two lines of functions. But we do not need to worry about the working of these sensors and on which protocol we can receive this data. A single process communication consists of 40 bits. These sensors provide data through a single wire two-way communication protocol. Connect the fourth pin (GND) to the ground pin of the Arduino board Installing DHT11/DHT22 Library in Arduino IDEīoth DHT11 and DHT22 provide the output of temperature and humidity in the complex digital output format which can not be directly read with GPIO pins without writing any technique which can read these output signals.DHT22 is also known by the name of AM2302. You can check the datasheet of DHT11 and DHT22 to get more information about it. But you can also use any digital pin of Arduino.Ī Pull-up resistor is used to keep the data pin high for proper communication between the microcontroller and sensor.
![adafruit trinket hc-05 adafruit trinket hc-05](https://m.media-amazon.com/images/I/41-gFPa-JyL._SX385_.jpg)
Connect this pin with D8 of Arduino and also connect the data pin with a 10k pull-up resistor. Data out is the pin through which we get temperature and humidity samples from the DHT sensor.Connect it with the 3.3 volt pin of Arduino. The first pin for both sensors is a power supply(Vcc) pin.But on DHT modules only three pins are exposed to the pinout of the module and 10k ohm pull-up resistor is internally connected to pin 2. The following figure shows the pinout diagram of DHT sensors. These two components measure humidity and temperature. They are internally composed of a humidity sensing sensor and a thermistor. We can directly connect them with Arduino to obtain sensor output reading. We can use the same Arduino sketch to read temperature and humidity readings by selecting the DHT type inside the code.ĭHT sensors are pre-calibrated. Regardless of the above differences, both DHT sensors have the same working principle and same pinout. Furthermore, the operating voltage range for both sensors is almost and we can directly power these sensors from the power pins of Arduino. However, DHT11 has a better sampling period. DHT22 DHT11 Temperature -40 to 80 ✬ +/- 0.5✬ 0 to 50 ✬ +/-2 ✬ Humidity 0 to 100% +/-2% 20 to 90% +/-5% Resolution Humidity: 0.1%Temperature: 0.1✬ Humidity: 1%Temperature: 1✬ Operating Voltage 3- 6 V DC( directly powerable from Arduino) 3-5.5 V DC( directly powerable from Arduino) Sampling time 2 seconds 1 second Current rating $4 to $10 $1 to $5 Output data type float int Pinout 4-pin (same as DHT11) 4-pin (same as DHT22) Price ($) 5 2Īs you can see from the above comparison table that DHT22 offers a wider temperature range and resolution for temperature and humidity. The following table lists the comparison of both DHT sensors. They are quite similar to each other with some differences in specifications.ĭHT22 is almost similar to the DHT11 but the former measures temperature and humidity with higher accuracy and supports a wider range.
![adafruit trinket hc-05 adafruit trinket hc-05](https://cdn-learn.adafruit.com/assets/assets/000/025/644/medium800/trinket5.png)
It provides a calibrated digital output with a 1-wire protocol. The DHT11/DHT22 is a sensor which measures relative humidity and temperature sensor.
#Adafruit trinket hc 05 serial
DHT11/DHTT22 Display Readings on Arduino Serial Monitor.Installing DHT11/DHT22 Library in Arduino IDE.