Are you a starter with Croduino? Or a newbie when it comes to electronics? You fancy a specific module, but you don’t know how to use it? Don’t worry, we have our How To Use series!

How to Use is a series of blog tutorials by e-radionica where you will find everything you need to begin working with your favorite modules. Tutorials include technical characteristics, operating principles, instructions on how to connect the module with Croduino and basic coding. Everything else is up to you and your imagination.


DHT11 is probably one of the first sensors you will meet. It is included in Croduino set for beginners. It reads temperature and humidity and allows us to handle that information with ease.

Temperature measuring range: 0° – 50° C
Humidity measuring range (in air): 20% – 90%
Temperature measuring deviation: +/- 2 °C
Humiditiy measuring deviation: +/- 5%
Voltage: 3V – 5V
Current: 100uA(standby), 2.5mA(measuring)


Inside the module itself, there are, obviously, 2 sensor types:
* temperature sensor: small termistor(type of temperature sensor) soldered on board.
* humidity sensor: small pcb soldered to the basic one. It has open (uncovered) copper lines which are close to each other. The more humidity in the air, the more humidity is on the lines themselves and there is less resistance between them (or in case of water – just shows up – that is the reason why sensor starts to read values on 20%; only then it can read resistance).
In addition to the two components mentioned, there is another integrated circuit that analyzes the inputs of these two sensors and communicates with Croduino. (if you are really curious about what’s inside, you can open the blue case :))
Regarding communication, there is a library which will make using much easier. Namely, it has already summarized all the procedures needed to establish communication.

In this tutorial we will use:

  • Croduino Basic
  • DHT11
  • Mini breadboard
  • M-M cables


DHT11 Croduino
pin1 +5V
pin2 A0
pin3 –
pin4 gnd

It is suggested to add a pull-up resistor of 10kOhm.



At this link can find and download Arduino library which simplifies using of the DHT11. You’ll be able to find code which writes values of temperature and humidity inside Serial monitor under examples of that library. If you need some help regarding the installation of the library, check out our tutorial about it. After you’ve downloaded and installed the library, you can use the code below.

#include "DHT.h"
#define DHTPIN A0 // to which pin the DHT11 is connected
#define DHTTYPE DHT11
void setup() {
  Serial.println("DHT11 test!");
void loop() {
  //wait for a few seconds between each measurement
  // reads humidity in the h variable and the temperature in the t variable
  float h = dht.readHumidity();
  float t = dht.readTemperature();
  if (isnan(h) || isnan(t)) {
    Serial.println("Unsuccessful reading of the sensor! ");
  Serial.print("Humidity: ");
  Serial.print(" %\t");
  Serial.print("Temperature: ");
  Serial.println(" *C ");