Anda di halaman 1dari 5
saree ‘rt Hiya Teme Sosa wth rei Cara arn cr ates akg) ‘Search Garage ab arin, + Sign Up Haz Tutorial: Humidity and Temperature Sensor with Arduino + Posted by GarageLab on June 1, 2012 at 1:16pm + Viow Blog ‘The humidity and temperature sensor RHTO3 isan affordable and easy to use sensor. This sensor just need an external resistor to work and you ean casily read the data from only one pin, Also, that sensor comes already calibrated To use it with your Arduino, you have to download the DHT library bere. The files éht.cpp and dht.h are posted inthe page, not in a download link. Copy and paste it on a text ile in the libraries folder of your IDE Reading the RHTO3 datasheet, we ean check the sensor pinout: rpsgeegaicontretesepeteruishandangaramrnrsire ts wom “ra amity Terai Sera win ran Carns (ain dct, eles hci “73 Pia sequence number: 1234 (rom right dein). Pia_| Function WDD power DATicsenal ULL XD ‘Make the following circuit; ‘The RHTO3 works from 3.3V to 6V, so we will use the SV provided by the Arduino board, The sensor pin 2 goes tothe Arduino pin 5, with a IKobm pull-up resistor, like show inthe datasheet Vee Vee Gad ‘Open your IDE and paste the code, adapted from hese: Hinclude ght DAT: Héefine pHT22_PIN 5 vold setup () ‘ Serial.begin (3600) ; Serial.println ("DHT TEST PROGRAM Serial.print ("LIBRARY VERSTON: "); Serial.printIn(DET_LIB VERSION) ; Serial.println); Serial.printin("Type, \tatatus, \tiumidity (3),\tTemperature ()"): rpsgeegaicontretesepeteruishandangaramrnrsire wom “ra amity sera Ser win ran Carga (ain dct, eles rc void Loop () ‘ 17 READ DRTA Serial.print ("DRT22, \t"); int chk = DAT.read22 (D4T22_PIN) ; awiteh (enk) ‘ case DATLIB_OK: Serial.print ("OK,\t") break: case DATLTB_ERROR CHECKSUM: Serial.print ("checksum error, \t"); break: case DATLTB_ERROR TIMEOUT: Serial.print ("Time out error, \t"); break: default: Serial.print ("Unknown error, \t"); break: , // DISPLAY DATA Serial.print (OHT.hunidity, 1)+ Serial.print (",\E"); Serial.printIn(DHT.temperature, 1); delay (1000); ) everything went right, you should see something like this on your serial monitor: sena| | watoscrot [BothNLACR | >) [r15200baud] + References ‘htp//arduino e/playground/Main/DHTLly gpl ww sparkfun com/product/ 10167 Views: $0561 Like O members lke this sh 6*'| Facebook + Bcc by david chan on November 18, 2014 at 11:51pm How do you see the output Comment You need to be a member of GarageLab (arduino, electronics, robotics, hacking) to add comments! RSS Welcome to GarageL.ab (arduino, electrons, robotics, hacking) Sign Up or Sign Ia rapgeegaicontrtesepe ter uishandangaramrnorsire swam “ra amity sera Ser win ran Carga (ain dct, eles rc (Or ign in wit Join us to receive our News and bdalcsabout ules sees, tadmuchmonst Latest Activity (Bsr sow asin age in, toni tis, ng Fstours ano Mase Isnt Mh sree snisnan sows meter fang (ein, eons ets, bsg) Monday Welcome Them! ‘ommented on Marcelo Rodrigues's blog post SwagHiot "Great use of technology right there.” oct s Moinsicuna es comment or Ole Gis shy here...what do you wish to talk about..if you could bea tad more specific?" Brscc reson ot cis sin ize and 1 moe joined Gargel ab (rduino, electronics, robots, hacking) ets Mois cis pte i nite ets Moa susie comstsl on GangsLa' og pon Tani tosh Mans Mate hid “hin gl sett tt rasing nse ot Tea uni ons sonny. rere iti saree "ar: unlay Tomar Sasr wt rai Carabiner bes ke) FBBcoct tensors peas blog post ‘Some great maker projects vou can join If you ae interested in joining some teams consisting of makers working together from all over the ..See More oct (0Comments Likes BBs Slepov posted a blog post Tibbo Project System-based Office Aircon Controller Application The app allows you to manage traditional ar conditioners that are controlled through infrared, ..See More oct 4 Comments 0 Likes : Rodrigues left a comment for Jose Gustavo Abreu Murta "Spammer member suspended. Thanks!" oct? Ga. A2f Oct Mesos sei et sonmen fr Bos ei Thave left a message to your given e-mail address Mr Frank. Thanks!" Sep 30 Boece ossain wpe ne ste Sa30 a wey, Neil Besner and Jim Ory joined GarageLab (arduino, electronics, robotic, hacking) os Mocsoc0 xan tea sms fr Maso Maue sei a PM ‘Test application forthe FPGA. Tibbit (#57) in the smart LED controller configuration Sep 28 O.Comments 0 Likes IRANK KWABENA and RossBurk joined GarageLab (arduino, electronics, robotics, hacking) AL Sep 28 Vs : i‘ chraam vousif dud and 6 more joined GarageLab (arduino, electronics, robotics, hacking) Sep 26 More. + RSS ©2016 Cr ted by Marcelo Rodrigues, Powered by Badges | Reportan Issue | Tes of Service ‘Sign in to chat! rpsgeegaicontretesepeteruishandangaramrnrsire

Anda mungkin juga menyukai