Cov txheej txheem:

Ntse-Stat: 7 Cov Kauj Ruam
Ntse-Stat: 7 Cov Kauj Ruam

Video: Ntse-Stat: 7 Cov Kauj Ruam

Video: Ntse-Stat: 7 Cov Kauj Ruam
Video: Plab Plab Ntswg..(Pluav Pluav Ntswg) Maiv Twm New Song 2023-2024 2024, Kaum ib hlis
Anonim
Ntse-Stat
Ntse-Stat
Ntse-Stat
Ntse-Stat
Ntse-Stat
Ntse-Stat
Ntse-Stat
Ntse-Stat

Peb cov khoom tso cai rau tib neeg los tshuaj xyuas qhov ua tau zoo ntawm lawv cov cua sov thiab cua txias hauv lawv lub tsev los ntawm kev ntsuas qhov kub thiab txias ntawm cov khoom siv freon nkag thiab tawm los ntawm cov txheej txheem yooj yim thiab muaj tiag. Cov cuab yeej ntse no yuav txhawb kom tib neeg txiav txim siab lub zog ntau nrog lawv cov cua sov thiab cua txias.

Kauj Ruam 1: Qhov Yuav Tsum Tau

Yam Yuav Tsum Tau
Yam Yuav Tsum Tau
Yam Yuav Tsum Tau
Yam Yuav Tsum Tau
Yam Yuav Tsum Tau
Yam Yuav Tsum Tau

- Arduino Ib

- Creadboard (4)

- Thermistor (2) Cov

- 10K Resistors (2)

- Khawm Khawm

- Piezo Buzzer

- LCD Zaub

- Cov potentiometer

- Cov xov hlau (25)

- Micro USB lossis USB Txuas

Kauj Ruam 2: Hlau Breadboard rau Kub Sensor

Hlau Breadboard rau Kub Sensor
Hlau Breadboard rau Kub Sensor

TMP thermistor yog hom ntsuas kub uas ntsuas qhov ntsuas hluav taws xob hla lub ntsuas cua raws li qhov ntsuas kub ib puag ncig hloov pauv. Qhov ntsuas tshwj xeeb no muaj peb tus pin - qhov zoo, hauv av, thiab teeb liab. Qhov ntsuas no yog lub ntsuas hluav taws xob tawm, thiab hloov pauv qhov kub ntawm ib qib Celcius yog sib npaug rau kev hloov pauv ntawm 10 millivolts ntawm lub zog tso tawm.

Txheej txheem:

1) Txuas koj lub ntsuas kub raws li qhia hauv daim duab saum toj no. Cov xov hlau nruab nrab yuav txuas rau A0.

2) Txuas koj lub ntsuas kub thib ob zoo ib yam rau thawj, thiab cov xov hlau nruab nrab yuav txuas rau A1.

Kauj Ruam 3: Piezo Buzzer

Piezo Buzzer Cov
Piezo Buzzer Cov

Piezo buzzer yog lub cuab yeej siv los ceeb toom rau tus neeg siv thaum lawv cua sov cua txias thiab cua txias tsis ua haujlwm ntawm qhov ua tau zoo. Lub suab ceeb toom qhia rau tus neeg siv lawv yog qhov teeb meem.

Txheej txheem:

1) Txuas lub buzzer rau lub rooj tsavxwm raws li qhia hauv daim duab saum toj no.

Kauj ruam 4: Ntxiv Khawm

Ntxiv khawm
Ntxiv khawm

- Lub laub khawm yog ib feem uas txuas ob lub ntsiab lus hauv Circuit Court thaum koj nias nws.

- Hauv peb cov khoom lag luam, khawm hloov ntawm qhov ntsuas kub thiab ua haujlwm tau los ntawm cov ntaub ntawv ntsuas kub ntsuas.

Txheej txheem

1) Txuas lub pob raws li nws tau qhia hauv daim duab saum toj no.

Kauj Ruam 5: Txuas LCD cais cais Breadboard & rau Lub Hwj Chim

Txuas LCD txhawm rau cais Breadboard & rau Fais Fab
Txuas LCD txhawm rau cais Breadboard & rau Fais Fab

LCD, kua siv lead ua kua, yog lub vijtsam yooj yim uas tuaj yeem qhia rau tus neeg siv thaum qee yam tsis raug nrog cua sov, qhov cua nkag thiab cua txias hauv lawv lub tsev. Ex tsis ua haujlwm tau zoo, kev ua haujlwm tsis tiav

Daim duab qhia chaw yuav pab koj txuas lub vijtsam rau lub rooj tsavxwm kom raug.

Kauj ruam 6: Code

a = arduino ('com3', 'uno', 'libraries', 'Piv txwvLCD/LCDAddon'); % tsim cov khoom arduino qhia meej piv txwvLCD/LCDAddon lub tsev qiv ntawv.

lcd = addon (a, 'Piv txwvLCD/LCDAddon', {'D7', 'D6', 'D5', 'D4', 'D3', 'D2'}); % tsim cov khoom LCD, thiab qhia meej txog cov pins teeb tsa ntawm Arduino ntaus ntawv.

initializeLCD (lcd, 'Kab', 2, 'Kab', 16); % pib ua lub vijtsam lcd

setpref ('Internet', 'SMTP_Server', 'smtp.gmail.com');

setpref ('Internet', 'E_mail', '[email protected]'); % mail account xa los ntawm

setpref ('Internet', 'SMTP_Username', 'bwnanney'); % tus neeg xa npe siv

setpref ('Internet', 'SMTP_Password', 'Morill1204'); % xa tus password

cov khoom = java.lang. System.getProperties;

props.setProperty ('mail.smtp.auth', 'tseeb');

props.setProperty ('mail.smtp.socketFactory.class', 'javax.net.ssl. SSLSocketFactory');

props.setProperty ('mail.smtp.socketFactory.port', '465');

b = readDigitalPin (a, 'D9'); % nyeem tus lej digital (tus lej digital)

nyeem ntawv = nyeemVoltage (a, 'A0'); % nyeem qhov hluav taws xob ntawm cov ntsuas cua sov sib txuas nrog tus pin A0

nyeem 2 = nyeemVoltage (a, 'A2'); % nyeem qhov hluav taws xob ntawm cov ntsuas cua sov sib txuas nrog tus pin A2

thaum muaj tseeb % loops los ntawm cov lus uas twb muaj lawm ntev li qhov tseeb

b = readDigitalPin (a, 'D9'); % nyeem tus lej digital (tus lej digital)

nyeem = readVoltage (a, 'A0'); % nyeem qhov hluav taws xob ntawm cov ntsuas cua sov sib txuas nrog tus pin A0

yog tias nyeem> = 0.6 && nyeem <0.68 % ua raws txoj cai ib txheej ntawm nqe lus (thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'Temp 64 F'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

elseif nyeem ntawv> = 0.68 && nyeem <0.69 % raws li txoj cai ib txheej ntawm nqe lus (thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'Temp 66 F'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

elseif nyeem ntawv> = 0.69 && nyeem <0.7 % raws li txoj cai ib txheej ntawm nqe lus (thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'Temp 68 F'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

elseif nyeem ntawv> = 0.7 && nyeem <0.71 % raws li txoj cai ib txheej ntawm nqe lus (thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'Temp 70 F'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

elseif nyeem ntawv> = 0.71 && nyeem <0.72 % raws li txoj cai ib txheej ntawm nqe lus (thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'Temp 72 F'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

elseif nyeem ntawv> = 0.72 && nyeem <0.73 % raws li txoj cai ib txheej ntawm nqe lus (thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'Temp 74 F'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

elseif nyeem ntawv> = 0.73 && nyeem <0.74 % raws li txoj cai ib txheej ntawm nqe lus (thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'Temp 76 F'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

elseif nyeem ntawv> = 0.74 && nyeem <0.75 % raws li txoj cai ib txheej ntawm nqe lus (thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'Temp 78 F'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

elseif nyeem ntawv> = 0.75 && nyeem <0.76 % raws li txoj cai ib txheej ntawm nqe lus (thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'Temp 80 F'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

elseif nyeem ntawv> = 0.76 && nyeem <0.77 % raws li txoj cai ib txheej ntawm nqe lus (thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'Temp 82 F'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

elseif nyeem ntawv> = 0.77 && nyeem <0.8 % raws li txoj cai ib txheej ntawm nqe lus (thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'Temp 84 F'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

playTone (a, 'D10', 880, 0.25) % ua si sau ntawv (a, tus pin, zaus, sijhawm)

ncua (0.3) % ncua tseg tom qab ceeb toom rau teeb sijhawm

playTone (a, 'D10', 880, 0.25) % ua si sau ntawv (a, tus pin, zaus, sijhawm)

ncua (0.3) % ncua tseg tom qab ceeb toom rau teeb sijhawm

playTone (a, 'D10', 880, 0.25) % ua si sau ntawv (a, tus pin, zaus, sijhawm)

ncua (0.3) % ncua tseg tom qab ceeb toom rau teeb sijhawm

playTone (a, 'D10', 880, 0.25) % ua si sau ntawv (a, tus pin, zaus, sijhawm)

ncua (0.3) % ncua tseg tom qab ceeb toom rau teeb sijhawm

playTone (a, 'D10', 987, 0.25) % ua si sau ntawv (a, pin, zaus, sijhawm)

ncua (0.3) % ncua tseg tom qab ceeb toom rau teeb sijhawm

playTone (a, 'D10', 987, 0.25) % ua si sau ntawv (a, pin, zaus, sijhawm)

ncua (0.3) % ncua tseg tom qab ceeb toom rau teeb sijhawm

playTone (a, 'D10', 880, 0.12) % ua si sau ntawv (a, tus pin, zaus, sijhawm)

ncua (0.1) % ncua tseg tom qab ceeb toom rau teeb sijhawm

playTone (a, 'D10', 740, 0.12) % ua si sau ntawv (a, pin, zaus, sijhawm)

ncua (0.1) % ncua tseg tom qab ceeb toom rau teeb sijhawm

playTone (a, 'D10', 587, 0.25) % ua si sau ntawv (a, tus pin, zaus, sijhawm)

ncua (0.3)

xa email ('[email protected] ',' Cua sov thiab Cua Txias Hauv Qhov Xav Tau Kev Pab !!! ', …

'Cov cua sov thiab cua txias ua haujlwm tsis muaj txiaj ntsig. Thov kom tus kws tshaj lij pabcuam chav haujlwm kom sai li sai tau. ') % Xa email rau tus email tshwj xeeb

elseif nyeem ntawv> = 0.8 && nyeem <0.85 % raws li txoj cai ib txheej ntawm nqe lus (thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'Temp 86 F'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

elseif nyeem ntawv> = 0.85 && nyeem <2 % raws li txoj cai ib txheej ntawm nqe lus (thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'HOT HOT BABY !!!'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

kawg % xaus yog hais tias

thaum b == 0 % loops los ntawm cov lus uas twb muaj lawm ntev li qhov tsis tseeb

b = readDigitalPin (a, 'D9'); % nyeem tus lej digital (tus lej digital)

nyeem 2 = nyeemVoltage (a, 'A2'); % nyeem qhov hluav taws xob ntawm cov ntsuas cua sov sib txuas nrog tus pin A2

yog nyeem 2> = 0.6 && nyeem ntawv 2 <0.68 % ua raws txoj cai ib txheej ntawm nqe lus (thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'Ua Tau Zoo 80%'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

elseif nyeem ntawv 2> = 0.68 && nyeem ntawv 2 <0.69 % ua raws txoj cai ib txheej ntawm nqe lus (thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'Ua Tau Zoo 90%'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

elseif nyeem ntawv 2> = 0.69 && nyeem ntawv 2 <0.7 % ua raws txoj cai ib nqe lus (ib qho thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'Ua Tau Zoo 95%'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

elseif nyeem ntawv 2> = 0.7 && nyeem ntawv 2 <0.71 % ua raws txoj cai ib nqe lus (ib qho thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'Ua Tau Zoo 97%'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

elseif nyeem ntawv 2> = 0.71 && nyeem ntawv 2 <0.72 % ua raws txoj cai ib txheej ntawm nqe lus (thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'Ua Tau Zoo 100%'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

elseif nyeem ntawv 2> = 0.72 && nyeem ntawv 2 <0.73 % raws li txoj cai ib txheej ntawm nqe lus (thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'Ua Tau Zoo 95%'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

elseif nyeem ntawv 2> = 0.73 && nyeem ntawv 2 <0.74 % ua raws txoj cai ib txheej ntawm nqe lus (thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'Ua Tau Zoo 90%'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

elseif nyeem ntawv 2> = 0.74 && nyeem ntawv 2 <0.75 % raws li txoj cai ib txheej ntawm nqe lus (thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'Ua Tau Zoo 85%'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

elseif nyeem ntawv 2> = 0.75 && nyeem ntawv 2 <0.76 % ua raws txoj cai ib txheej ntawm nqe lus (thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'Ua Tau Zoo 80%'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

elseif nyeem ntawv 2> = 0.76 && nyeem ntawv 2 <0.77 % ua raws txoj cai ib txheej ntawm nqe lus (thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'Ua Tau Zoo 75%'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

elseif nyeem ntawv 2> = 0.77 && nyeem ntawv 2 <0.8 % raws li txoj cai ua ib txheej ntawm nqe lus (thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'Ua Tau Zoo 70%'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

elseif nyeem ntawv 2> = 0.8 && nyeem ntawv 2 <0.85 % raws li txoj cai ib txheej ntawm nqe lus (thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'Ua Tau Zoo 65%'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

elseif nyeem ntawv 2> = 0.85 && nyeem ntawv 2 <2 % raws li txoj cai ua ib txheej ntawm nqe lus (thaiv).

clearLCD (lcd) % tshem tawm qhov lcd screen

printLCD (lcd, 'NYOB NTUJ !!!'); % Luam ib txoj hlua rau LCD.

ncua (0.5) % ncua ua ntej ua tiav cov lus txib tom ntej

kawg % kawg yog nqe lus

kawg % kawg thaum lub voj

kawg % kawg thaum lub voj

Kauj Ruam 7: Daim duab

Daim duab
Daim duab

Nov yog qhov sawv cev tseem ceeb ntawm qhov ntsuas kub yuav tso rau ntawm txoj kab paug thiab cov pa los saib xyuas qhov kub thiab txias ntawm txhua kab thiab qhov sib txawv ntawm lawv.

Pom zoo: