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
Posted on Wednesday September 25, 2019Logging refrigerator temperature with Arduino Blogdottv … Continue Reading »
Blip Nordic nRF52840 development board offers sensors, NFC, Bluetooth, debugger and more – Geeky Gadgets
Posted on Thursday September 26, 2019Blip Nordic nRF52840 development board offers sensors, NFC, Bluetooth, debugger and more Geeky Gadgets … Continue Reading »
Posted on Friday August 02, 2019Simulate Climate With An Arduino Hackaday … Continue Reading »
arduino humidity sensor Social
🔬 Now that you’ve gotten your feet wet, dive into the kit and enjoy all nine experiments. Order yours today: http://bit.ly/2MnQ7fr