5. Android Arduino DHT11, DHT22 Temperature and Humidity Sensor

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi welcome to the video tutorial on AO mits Android in this project uh we are going to see how to retrive temperature data from ardino to the Android device uh for this project I'm using a DHD sensor so yes you can see that I'm using a DHD sensor and a Bluetooth device so instead of uh connecting to the software seral for this tutorial I'm going to directly connect this uh TX pin to the RX pin RX pin to the TX pin make sure that you are not uh you know connecting TX to the TX and RX to the RX you have to inversely connect to it so if you are connecting uh if you you have to connect the TX to the RX pin of arino and the TX pin of or to the RX of Bluetooth make sure that you are doing it and if you interchanging this connection you will not receive any data from your Android device or send any data to your Android device so make sure this connection you are connecting properly and I have connected a second pin of DST sensor that is a data sensor pin connected to the second pin of adino and the first pin is the uh VCC so I combined both the VCC and one pin of the VCC is connected to the 5 youo and the ground of Bluetooth and the ground of the last pin the the third pin of dsd1 sensor has no connectivity so don't care about this third pin and the this one the fourth pin pin has connected to the ground you can see that I'll take a wire and connect it to both both the common grounds and one of the wire is taken to the ground of adino so this is what the connection is let's see how to uh create a app for this and rri our data first thing go to Project start new project and call it as dh1 uh this one is not for dh1 sensor alone you can use any of the temperature and humidity sensor so as usual I'm going to pick a let's pick up for Bluetooth and change the text now for this time I'm planning to add a image for this change the width to B parent I'm want to change a image so I'm going to upload it choose a file think I have it in my desktop my here okay I need to change it uh Within height now control this as 250 now it should be around 50 okay so it is set now and I need a label this label is going to store the uh value that is getting from my Bluetooth device the whatever the dhd1 temperature and humidity data that is sending from my BlueTooth uh audio know through a Bluetooth will be received by the Android phone so this data will be stored in the label to change the width to fill parent the height to automatic and the text label I'm leave it the same everything is going to be I'm going to make it a center okay so and one more thing I'm going to do with this app is whenever I press this button I'm going to also place a button here so here you can see that I used a button called temperature so whenever I press this temperature button the whatever the text or the data that is coming and displaying here will be converted the text will be converted to speech so that I can hear what is the current temperature and humidity right now so let's see that uh so the app the app is for we need a hidden components like and for connectivity I need a Bluetooth client and from sensors I need a clock and one more thing I need is to text to speech that will be available in media T to speech okay so more or less the user window has completed we'll move on to blogs now I'm going to check my bag whether all the datas are there or not my interconnection is damn slow see how long it is taking to load oops there is nothing there so I'm going to create now sound when I the list picker before [Music] picking before picking set L picker elements to set L paper elements to BL Cent on address yes and then when theit after picking and the list picker after [Music] picking if else it is if then if the bloth client is address I connected go there yeah blo client one connected address let's pick a one selection let isck this change it to selection copy this and paste here it's placing so sorry not paste so when I when the clock turns start to take when timer one start to take pick uh if then if the Bluetooth Cent one is connected duplicate this one change it to connector place here and we need the another if then control then what it should do we are going to compare It Go Math that is greater than so greater than symbol and I need another math function number the bytes that are available on the Bluetooth is greater I going to compare that with my Bluetooth client one BL client one call the blooth client one and check how many btes that is available to receive if it is greater than a zero then start to receive we have set the label one so then I'm going to call the label one and uh I'm going to say what are the available B I'm going to display on the label one I'm going to set the label one text two Bluetooth client one receive text go client one review text yes let see and the number of btes is here we already ped and copy here so that's it and the program is over actually and we have already added another uh function that when I press the button that is we named as a temperature so current temperature has to be converted from text to speech so if I call this button it should du should actually call the text to speech engine and uh convert my speech engine that is actually stored in the label one so I need to call it label one whatever the text that is available in the label one has to to be converted to spage okay and we have completed our app successfully in the designer you can see we have made it in the blogs you can see we have made it and that's it about the app part it is very simple and you can receive all the temperature and humidity data from the aino hardware so we'll move on to and check once again how it works on the hardware part so we have already seen the connection and how we have connected the dhd1 sensor and the Bluetooth device and minimizing in this is the program and this is the not the program that I have written it actually a example program that all uh comes with the dsd1 library so if you want to install the library just go on and click uh skan cetch add a file sorry include a library and manage libraries and if you go on and type here and search it's my internet connection is really really dead slow that's a reason I cannot do anything here so this is how this is what the procedure is so go uh the library manager and start typing dhd1 sensor you will be uh returned with the search that DD Library just go on and click it and install it that's all about including librarys cancel it now so it's getting downloaded let's wait and see it's taking too much of time to just download a 123k by that's too much I don't want to waste my time in this close cancel oops so actually the library is updated so if I go on plus DHD so here you can see that I install already installed to you have to actually install the DHD Sor Library by fruit this is a library sensor that we need needed for this tutorial and once you go on and find the DHD Library here just go on and click it the sensor Library this is the one example that I'm using here so here so if you're uh using a different type of sensor like if you you want to use a DHD 22 sensor actually you have to uncomment this one you have to uncomment this one and you have to comment this so here we have seen that I'm using a dhd1 type so I need to comment the dh22 and then comment the dh1 sensor that's it and as usual the same program what I'm using here is from the example program uh I just modified the sketch I have deleted some of the unwanted serial printing function so that's it about the programming part and I will show you how I connected physically through my cam window so here can see that the dhd1 sensor and a Bluetooth device has connected to my rgo and this is how I physically connected uh I'll show this how I'm retriving the data from my uh aino that is connected to my Bluetooth and I'll uh I cannot you know show my see here this is really um my tablet cannot fix in there actually the tablet cannot display by the small cam window so I will show that in my another cam so I'll finish the this part here and I'll move to my cam and show how I can retrive the data from my aino by connecting my app to the aino so here's our temperature sensor output here you can see oops that this one is connected to my Bluetooth device and this is the reading from my DHD temperature and humidity sensor I click on temperature humidity 58.0% temperature 30.0 asterisk c yeah so this is the app you can use for knowing your temperature and humidity when you press the temperature humidity 58.0% temperature 30.0 asterisk c yeah I can see and also if you want to know the temperature just need to go and press it temperature 32.0 asterisk C okay it's humidity 58.0% temperature 29.0 asteris c yeah it's it's actually saying the before temperature now it's changed humidity 58.0% temperature 30.0 asterisk C see humidity 58.0% temperature 30.0 so let's you just create this app and enjoy thanks for watching this video please subscribe humidity 58.0% temperature 30.0 Asis C humidity 58.0% temperature 30.0 asterisk C humidity 57.0% temperature 30.0 asterisk C humidity 58 % temperature 31.0 asteris
Info
Channel: Magesh Jayakumar
Views: 62,605
Rating: undefined out of 5
Keywords: DHT11 arduino, DHT22 arduino, DHT11 android, dht11 temperature and humity sensor android, dht11 sensor with android and arduino, humidity and temperature sensor android and arduino, how to make android app to get temperature and humity data into android mobile from arduino
Id: 3U8AEEQuyhY
Channel Id: undefined
Length: 15min 33sec (933 seconds)
Published: Fri Feb 12 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.