Cov txheej txheem:
- Kauj Ruam 1: Qhov Yuav Tsum Tau
- Kauj Ruam 2: Hlau Breadboard rau Kub Sensor
- Kauj Ruam 3: Piezo Buzzer
- Kauj ruam 4: Ntxiv Khawm
- Kauj Ruam 5: Txuas LCD cais cais Breadboard & rau Lub Hwj Chim
- Kauj ruam 6: Code
- Kauj Ruam 7: Daim duab
Video: Ntse-Stat: 7 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
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
- 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
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 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
- 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
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
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:
Ntse Watchz Nrog Corona Cov tsos mob pom thiab Logging Cov Ntaub Ntawv: 10 Cov Kauj Ruam
Ntse Watchz Nrog Corona Cov tsos mob thiab nrhiav cov ntaub ntawv: Qhov no yog Smartwatch nrog Corona cov tsos mob pom siv LM35 thiab Accelerometer nrog cov ntaub ntawv nkag ntawm tus neeg rau zaub mov. Rtc yog siv los qhia sijhawm thiab sib txuas nrog lub xov tooj thiab siv nws rau kev txiav cov ntaub ntawv. Esp32 yog siv los ua lub hlwb nrog cov tswj hwm cortex nrog Blue
Yuav Ua Li Cas DIY Ntse Cov Menyuam Qhov Muag Nrog SONOFF Ntse Hloov?: 14 Cov Kauj Ruam
Yuav Ua Li Cas DIY Ntse Cov Menyuam Qhov Muag Nrog SONOFF Ntse Hloov?: Siv Interlock Mode hauv SONOFF ntse hloov los tig koj cov menyuam qhov muag tsis pom kev/qhov muag tsis pom mus rau qhov ntse Koj puas yuav feem ntau ntawm koj pom zoo qhov no yog txoj haujlwm uas koj rub cov menyuam qhov muag/qhov muag tsis pom thaum sawv ntxov thiab rub nws thaum yav tsaus ntuj? Txawm li cas los xij, kuv
Lub Hnab Ntse Hnab Ntse Ntse Computer: 4 Kauj Ruam (nrog Duab)
Lub Hnab Ntse Hnab Ntse Ntse Computer: Qhov no yog "hnab looj tes ntse" nas lub computer uas tuaj yeem siv nrog ib lub PC, Mac, lossis Linux computer. Nws tau tsim los siv Binho Nova ntau tus txheej txheem USB host adapter, uas tso cai rau koj txuas cov ntsuas thiab lwm yam khoom siv rau koj lub khoos phis tawj thiab tom qab ntawd txuas ntxiv
Tsis Siv Neeg Ntim Txheeb Xyuas Qhov Ntse Ntse: 4 Cov Kauj Ruam
Tsis Siv Neeg Ntsuas Ntsuas Qhov Ntsuas Zoo: Lub ntsiab lus yog ua tus qauv uas tuaj yeem tshuaj xyuas thiab txheeb xyuas ob daim duab sib txawv thiab tso tawm nws ntim. Ntawm no peb xaiv mus nrog lub voos xwmfab thiab lub tog raj kheej ua ob yam sib txawv. Nws tuaj yeem txheeb xyuas cov duab, txheeb xyuas thiab xam lub ntim los ntawm nws tus kheej. Ua haujlwm
WiFi Pab Kom Kub Kub Tswj Ntse Ntse: 4 Cov Kauj Ruam
WiFi Pab Kom Kub Kub Tswj Ntse Ntse Plug: Hauv phau ntawv qhia no peb yuav saib seb yuav tsim WiFi li cas ntsuas kub ntsuas nrog siv ESP8266 yooj yim rau kev nqa hnyav thiab DHT11 ntsuas kub/av noo. Peb tseem yuav siv lub rooj tsav xwm uas kuv tau tsim thiab kuv