Cov txheej txheem:

Kub thiab Teeb Sensor: 8 Kauj Ruam
Kub thiab Teeb Sensor: 8 Kauj Ruam

Video: Kub thiab Teeb Sensor: 8 Kauj Ruam

Video: Kub thiab Teeb Sensor: 8 Kauj Ruam
Video: Thoj Keeb 8 End 2024, Kaum ib hlis
Anonim
Kub thiab Lub Teeb Sensor
Kub thiab Lub Teeb Sensor
Kub thiab Lub Teeb Sensor
Kub thiab Lub Teeb Sensor

Cov lus qhia no yog rau qhov ntsuas kub thiab lub teeb pom kev yooj yim. Hais txog nws.

Khoom siv:

-23 Dhia Cables

-110k Potentiometer

-1k tus neeg tiv thaiv

-LCD Zaub

-Breadboard

-Tus kws yees duab

-Arduino 2560 xyoo

Kauj Ruam 1: Kauj Ruam Ib: Txais Cov Khoom Siv

Kauj Ruam Ib: Tau Txais Cov Khoom Siv
Kauj Ruam Ib: Tau Txais Cov Khoom Siv

Xyuas kom koj cov khoom siv tau sib sau ua ke thiab npaj siv tau. Lawv tuaj yeem hloov tau yog pom tias ua tsis raug, tab sis nws yog qhov zoo kom muaj tus tuav qhov chaw thaum koj muab tso ua ke.

Kauj Ruam 2: Kauj Ruam Ob: Ntxig LCD thiab Txuas

Kauj Ruam Ob: Ntxig LCD thiab Txuas
Kauj Ruam Ob: Ntxig LCD thiab Txuas
Kauj Ruam Ob: Ntxig LCD thiab Txuas
Kauj Ruam Ob: Ntxig LCD thiab Txuas

Daim duab 3 thiab daim duab 4 qhia txoj hauv kev zoo ntawm kev ntxig rau LCD cov duab thiab thawj ib nrab ntawm cov hlua dhia ntawm cov qhob cij thiab Arduino.

Kauj Ruam 3: Kauj Ruam Peb: Ua Ntej Ua Ntej Txuas Breadboard Nrog LCD rau Arduino

Kauj Ruam Peb: Ua Ntej Txuas Breadboard Nrog LCD rau Arduino
Kauj Ruam Peb: Ua Ntej Txuas Breadboard Nrog LCD rau Arduino

Kauj Ruam Peb: Ua Ntej Txuas Breadboard nrog LCD rau Arduino Daim duab.

Kauj Ruam 4: Kauj Ruam Plaub: Ntxig thiab txuas lub Potentiometer

Kauj Ruam Plaub: Ntxig thiab txuas lub Potentiometer
Kauj Ruam Plaub: Ntxig thiab txuas lub Potentiometer

Daim duab 6 Qhia txoj hauv kev yooj yim rau ntxig thiab txuas lub hwj chim kom tsis txhob nkag mus rau hauv txoj hauv kev tom ntej. (Faj seeb: Lub potentiometer yuav tsis nkag mus rau hauv lub khob cij kom ruaj ntseg. Xyuas kom tseeb tias koj tau nyab xeeb nws thaum koj qhib lub Circuit Court.)

Kauj Ruam 5: Kauj Ruam Tsib: Muab thiab Txuas Cov Cuab Yeej

Kauj Ruam Tsib: Muab thiab Txuas Cov Sensors
Kauj Ruam Tsib: Muab thiab Txuas Cov Sensors

Daim duab 7 qhia txog kev tso chaw kom raug thiab cov ntsiab lus sib txuas rau thiab txuas txuas cov hlua txuas txuas kom raug mus rau LCD thiab Arduino. Thov nco ntsoov tias tus kws kho qhov muag tau nkag mus rau qib teeb pom kev zoo thiab tsis raug thaiv los ntawm ib qho dhia cable lossis lwm yam khoom siv hluav taws xob.

Kauj Ruam 6: Kauj Ruam Rau: Txuas Lub Computer thiab Arduino thiab Upload Code

Cov lej tuaj yeem pom ntawm

Kauj Ruam 7: (Xaiv tau) Kauj Ruam Xya: Hloov Txoj Cai Nyob Ntawm Qhov Kub Kub Hauv Kev Siv

TMP36 qhov ntsuas kub yog qhov siv nrog tus lej tam sim no, tab sis peb siv DHT11 cov av noo thiab ntsuas kub. Txij li qhov ntsuas no xa cov ntaub ntawv sib txawv, tus lej yuav tsum raug hloov pauv kom pom qhov kub kom raug.

Nco ntsoov rub lub tsev qiv ntawv DHT11 los ntawm qhov txuas hauv qab no thiab ntxiv nws rau koj lub tsev qiv ntawv database thiab cov cai.

github.com/adidax/dht11

#suav nrog

#suav nrog #define DHT11PIN 4 int lightPin = 1; int tempPin = 4; // BS E D4 D5 D6 D7 LiquidCrystal lcd (7, 8, 9, 10, 11, 12); dht11 DHT11; teeb tsa tsis muaj dab tsi () {lcd.begin (16, 2); } tsis muaj dab tsi voj () {Serial.println (); int chk = DHT11.read (DHT11PIN); Serial.print ("Vaum (%):"); Serial.println ((ntab) DHT11.humidity, 2); Serial.print ("Kub (C):"); Serial.println ((ntab) DHT11.temperature, 2); // Zaub Kub hauv C lcd.println (); int tempReading = analogRead (tempPin); ntab tempVolts = tempReading * 5.0 / 1024.0; ntab tempC = tempVolts * 11.1; ntab tempF = (tempC * 9) / 5 + 32; lcd.print ("Temp F"); lcd.setCursor (6, 0); lcd.print (tempF); // Zaub Teeb ntawm kab thib ob int lightReading = analogRead (lightPin); lcd.setCursor (0, 1); // ---------------- lcd.print ("Teeb"); lcd.setCursor (6, 1); lcd.print (teeb Nyeem); ncua (500); }

Kauj Ruam 8: Kauj Ruam Yim: Txaus Siab Rau Koj Qhov Kev Paub Tshiab

Nrog koj zoo siab, tus saib. Yog tias koj tau ua raws 7 qib dhau los, tam sim no koj yuav muaj qhov ntsuas kub thiab lub teeb pom kev zoo ntawm koj txhais tes. Siv qhov koj tau kawm rau qhov zoo, tsis yog kev phem.

Kev tsis lees paub: Yog tias koj siv thev naus laus zis no rau kev phem, tus tsim cov lus qhia no tsis muaj lub luag haujlwm rau yam koj ua.

Pom zoo: