arduino humidity sensor


What we have here. We have an you know, but you could use a mini a micro, whatever you have on hand, so let’s make the connections I’m going to use a breadboard. So you can see the connections a little bit better. So I’m, going to put my sensor right here as so and we’re going to start by making the ground connection from our Arduino to the negative pin of the sensor right there and then I’ll. Do my single pin to analog zero or a zero on the uno? To the center pin of the sensor like that and last it’s going to be the voltage so five volt to the plus pin on the sensor like that and that’s it that’s all the connections. We need to make so we’re going to go to the computer screen to look at the code and then we’ll upload the code to our uno and start receiving data from our little sensor here that we can monitor and the serial monitor so we’ll be right back. Okay, so where we are, this is the old code right here to get the information from our dht11. As you can see here at the top, we have an include library and you need to download that if you’re on youtube find the link below and if you’re on a website, you should see the link. So basically, we put that library in our app where we install arduino in the libraries folder, so arduino libraries and it’s, a folder, so DHT and inside you’ll find two files which has the information to actually access our humidity and temperature sensor.

So after that we’re going to go ahead and define an analog pin, we connect it to a zero, so we’re going to say a zero here. But you could change that to any pin you you connected to the middle sensor, pin to so that doesn’t you can change that to whatever you want as long as it’s an analog pin, and here we have the set up to basically output and prepare for the Serial monitor so we’re going to say sir you’ll begin 9600, so that’s our speed we’re, going to give it a delay of five hundred. So five hundred milliseconds to you know let the system boot up and then we’re going to put we’re going to print a title to our serial monitor. You know the HT one humidity and temperature sensor, so that will be the title that will appear when we open our s serial monitor then another delight just wait. Another like a second just before accessing the sensor and we’ll n set up here now. This is the main part of the program right here from void, loop and it’s, very simple, since we’re, using a library, everything that all the prior all the program is basically in the library, so we don’t have to put it in here. So it’s a lot it’s a lot easier. So we’re going to read the we’re going to say: DHT read: dll it’s a pin so that’s our a 0 up. There then we’re going to do a serial print current humidity, which is a title equals to serial.

print DHT humidity, so that information is going to be from the sensor itself and we put a percentage sign after that, because it’s a percentage humidity and then serial print. The temperature equals to DHT temperatures, temperature, sorry and Celsius. Now you can always change the Celsius to tonight by doing the calculation to actually convert from Celsius. So you change for an F here and you put that x or divided by something the delay after we did all this. So we put a delay of five seconds, so we wait five seconds before accessing the sensor again, because the sensor, I think, get the fastest. You should accessing is every two seconds since it so there you go that’s all you need to do to integrate one of these little sensors into your future projects.


arduino humidity sensor Video







arduino humidity sensor news








arduino humidity sensor Social






👋 Want to bring Tony Stark-like gesture control to your projects? Learn how with the BLE-enabled MKR WiFi 1010 and Nano 33 BLE Sense boards using the ArduinoBLE library.
safe image.php?d=AQDyi1ELcW4VGzhx&w=720&h=720& dChOhNMmeF - arduino humidity sensor

Arduin-yo ho ho! A fairground favorite, the pirate ship is a fun way to explore the oscillation of a pendulum. How much fun, you ask? Access our Science Kit Physics Lab preview and see for yourself:

🔬 Now that you’ve gotten your feet wet, dive into the kit and enjoy all nine experiments. Order yours today:

70537898 550174072395145 8798850142103928832 n.jpg? nc cat=102& nc oc=AQmCfMPwMf1oPpYqFhzbxfnGdbrmsjZXrEEBy1ox5Z8EJtiYMADoFNZ5mnSNRgCCY74& nc ht=scontent - arduino humidity sensor
qsUfGyyk normal - arduino humidity sensor
Mon Aug 12 12:17:29 +0000 2019

RT @SatonmyButt: Evening all
This week I have started to plan a remote temp & humidity sensor for my Top Bar Hive. Inside & outside sensors…

ZuSEz8wI normal - arduino humidity sensor
Wed May 08 14:16:21 +0000 2019

Arduino DHT11 Temperature and Humidity Sensor || arduino bangla basic tu… via @YouTube

Display Weather on an LCD

helathra25 photo

What do you know, it works! I know, different readings but there is a 10s delay in update. #xiaomi #btle temperature and humidity sensor captured with #arduino #esp32 – no pairing.

tiltti photo









(Visited 17 times, 1 visits today)

About The Author

You might be interested in

Comment (28)

  1. #include “DHT.h”

    #define DHTPIN 2 // номер пина, к которому подсоединен датчик

    // Раскомментируйте в соответствии с используемым датчиком

    // Инициируем датчик

    //DHT dht(DHTPIN, DHT22);

    DHT dht(DHTPIN, DHT11);

    void setup() {




    void loop() {

    // Задержка 2 секунды между измерениями


    //Считываем влажность

    float h = dht.readHumidity();

    // Считываем температуру

    float t = dht.readTemperature();

    // Проверка удачно прошло ли считывание.

    if (isnan(h) || isnan(t)) {

    Serial.println(“Не удается считать показания”);

    } else {
    Serial.print (“Humidity: “);
    Serial.print (h);
    Serial.print (“%\t”);
    Serial.print (“Temperature: “);
    Serial.print (t);
    Serial.println (” *C”);

  2. Sir can you please tell us the pin connections for Arduino Mega 2560 and how to display the temperature and humidity values on 1.8 TFT st7735

  3. Any chance you know if this would work with MIT App inventor 2, I’m trying to temp, humidity, gps, and prewritten message send to someone as a project. Thanks to anyone that can guide me to any kind of solution.

  4. why is it showing me
    Current humidity = 0.00% temper13:42:53.273 -> ature = 0.00C
    Current humidity = 0.00% temperature = 0.00C
    Current humidity = 0.00% temperature = 0.00C

  5. Have you worked with a device from which is a self contained unit with integrated components (e.g. Wifi, SD, LCD, etc…). The unit is based on the MEGA 2560. I am having issues reading DHT11 via an analog pin. Seems to be having issues retrieving the data, but all the tutorials simply just use DHT.h / DHT.cpp or other simply DHT sensors. But no luck. I would appreciate any feedback.

  6. I am not getting any errors but the Serial Monitor only gives me 0,00% Humidity and 0 C. The Library must be broken somehow

    1. I managed to get it working. I used a diffrent library and changed arround the vcc and the signal Pin. Most charts online are actually wrong!!


Your email address will not be published. Required fields are marked *