Cov txheej txheem:

Interface Raindrop Sensor rau NodeMcu - rau Beginner: 5 Kauj Ruam
Interface Raindrop Sensor rau NodeMcu - rau Beginner: 5 Kauj Ruam

Video: Interface Raindrop Sensor rau NodeMcu - rau Beginner: 5 Kauj Ruam

Video: Interface Raindrop Sensor rau NodeMcu - rau Beginner: 5 Kauj Ruam
Video: How does work RAIN SENSOR | RAIN SENSOR with Arduino Uno [Code and Circuit diagram] 2024, Hlis ntuj nqeg
Anonim
Interface Raindrop Sensor rau NodeMcu | rau Beginner
Interface Raindrop Sensor rau NodeMcu | rau Beginner

hauv qhov kev qhia no koj paub txog yuav ua li cas txhawm rau cuam tshuam cov kua dej nag sensor rau NodeMcu

Kauj ruam 1:

Duab
Duab

Hnub no cov lus qhia yog hais txog kev cuam tshuam ntawm Raindrop sensor nrog NodeMcu. Los nag sensor module yog Vary yooj yim cov cuab yeej rau nag nrhiav kom tau. Nws tuaj yeem siv los hloov pauv thaum nag los poob los ntawm pawg thawj coj los nag thiab tseem ntsuas ntsuas dej nag. Cov qauv nta, cov nag los nag thiab cov tswj hwm pawg uas sib cais kom yooj yim dua, lub zog ntsuas LED thiab kev hloov pauv tau txawm tias lub zog loj.

Kauj Ruam 2: Txoj Cai Ua Haujlwm ntawm Dej nag Sensor

Txoj Cai Ua Haujlwm ntawm Raindrop Sensor
Txoj Cai Ua Haujlwm ntawm Raindrop Sensor

Raindrop sensor yog ib lub rooj tsavxwm uas xaum npib tsib xee yog txheej hauv cov kab. Nws ua haujlwm ntawm tus thawj xibfwb ntawm kev tawm tsam. Thaum tsis muaj nag los poob rau ntawm lub nkoj. Kev tawm tsam siab yog li peb tau txais qhov hluav taws xob siab raws li V = IR. Thaum nag poob tam sim no nws txo qhov tsis kam vim tias dej yog tus coj hluav taws xob thiab muaj dej txuas cov kab npib tsib xee nyob rau hauv tib qho thiaj li txo qis thiab txo qhov hluav taws xob poob thoob nws.

Kauj Ruam 3: Tus Pin Configuration Raindrop Sensor

Pin Configuration Raindrop Sensor
Pin Configuration Raindrop Sensor

Nws suav nrog ob ntu ib qho yog lub rooj tsav xwm dub nrog txheej npib tsib xee ntawm nws thiab lwm qhov yog kev sib xyaw ua ke muab nrog qee tus pin pins. Board muaj 2 tus pin tso tawm thiab nti muaj 6 tus pin

Kauj Ruam 4: Circuit Diagram ntawm Raindrop Sensor cuam tshuam nrog NodeMcu

Circuit Diagram ntawm Raindrop Sensor cuam tshuam nrog NodeMcu
Circuit Diagram ntawm Raindrop Sensor cuam tshuam nrog NodeMcu

Cov khoom siv sib piv tau siv hauv kev txheeb xyuas cov tee hauv qhov dej nag. Txuas nrog 3, 3V cov khoom siv hluav taws xob, LED yuav tig Tawm thaum lub rooj tsav xwm tsis muaj nag los, thiab cov zis qis. Thaum tso me ntsis dej, tso zis siab, qhov ntsuas qhov ntsuas yuav qhib. Txhuam cov dej me me, thiab thaum rov qab los rau hauv lub xeev thawj zaug, tso tawm theem siab. Thaum tsis muaj nag los cov digital tso tawm yog 1 thiab cov analog tso tawm muab 1023 tus nqi siab tshaj. Thaum nag los tam sim no cov zis digital yog 0 thiab cov analog tso tawm ntau dua 1023.

Kauj ruam 5:

Code

Nyem qhov no

Phau ntawv qhia no tau tshaj tawm thawj zaug

Nyem qhov no

Pom zoo: