Cov txheej txheem:

Yuav Siv PIR Sensor Li Cas thiab Buzzer Module - Visuino Tutorial: 6 Cov Kauj Ruam
Yuav Siv PIR Sensor Li Cas thiab Buzzer Module - Visuino Tutorial: 6 Cov Kauj Ruam

Video: Yuav Siv PIR Sensor Li Cas thiab Buzzer Module - Visuino Tutorial: 6 Cov Kauj Ruam

Video: Yuav Siv PIR Sensor Li Cas thiab Buzzer Module - Visuino Tutorial: 6 Cov Kauj Ruam
Video: Часы G Shock до 100 долларов-15 лучших часов Casio G Shock до 100 дол... 2024, Kaum ib hlis
Anonim

Hauv qhov kev qhia no peb yuav kawm paub siv lub PIR sensor thiab lub suab nrov nrov kom ua suab nrov txhua lub sijhawm PIR sensor pom lub zog.

Saib daim vis dis aus.

Kauj ruam 1:

Duab
Duab
Duab
Duab
Duab
Duab
  • Arduino UNO (lossis lwm yam Arduino)
  • PIR Sensor Cov
  • Buzzer module
  • Jumper xov hlau
  • Visuino program: Rub tawm Visuino

Kauj ruam 2: Circuit Court

Qhov Circuit
Qhov Circuit
  • Txuas PIR sensor tus pin [GND] rau Arduino tus pin [GND]
  • Txuas PIR sensor tus pin [VCC] rau Arduino tus pin [5V]
  • Txuas PIR sensor tus pin [Teeb liab] rau Arduino tus lej digital [8]
  • Txuas Buzzer tus pin [+] rau Arduino tus pin [5V]
  • Txuas Buzzer tus pin [-] rau Arduino tus pin [GND]
  • Txuas Buzzer tus pin [S] rau Arduino tus lej digital [7]

Kauj Ruam 3: Pib Visuino, thiab Xaiv Arduino UNO Board Type

Pib Visuino, thiab Xaiv Arduino UNO Board Type
Pib Visuino, thiab Xaiv Arduino UNO Board Type
Pib Visuino, thiab Xaiv Arduino UNO Board Type
Pib Visuino, thiab Xaiv Arduino UNO Board Type

Txhawm rau pib ua haujlwm rau Arduino, koj yuav tsum muaj Arduino IDE teeb tsa los ntawm no:

Thov nco ntsoov tias muaj qee qhov teeb meem tseem ceeb hauv Arduino IDE 1.6.6. Nco ntsoov tias koj nruab 1.6.7 lossis siab dua, txwv tsis pub Cov Lus Qhia no yuav tsis ua haujlwm! Yog tias koj tsis tau ua raws cov kauj ruam hauv Phau Ntawv Qhia no teeb tsa Arduino IDE rau program Arduino UNO! Visuino: https://www.visuino.eu tseem yuav tsum tau teeb tsa. Pib Visuino raws li pom hauv thawj daim duab Nyem rau ntawm "Cov cuab yeej" khawm ntawm Arduino tivthaiv (Daim Duab 1) hauv Visuino Thaum qhov kev sib tham tshwm, xaiv "Arduino UNO" raws li qhia hauv daim duab 2

Kauj Ruam 4: Hauv Visuino Ntxiv thiab Txuas Txuas

Hauv Visuino Ntxiv thiab Txuas Txuas
Hauv Visuino Ntxiv thiab Txuas Txuas
Hauv Visuino Ntxiv thiab Txuas Txuas
Hauv Visuino Ntxiv thiab Txuas Txuas
Hauv Visuino Ntxiv thiab Txuas Txuas
Hauv Visuino Ntxiv thiab Txuas Txuas
Hauv Visuino Ntxiv thiab Txuas Txuas
Hauv Visuino Ntxiv thiab Txuas Txuas
  • Ntxiv "Digital (Boolean) Hloov Xwb" tivthaiv
  • Ntxiv "Ua Si Zaus Tone" tivthaiv thiab hauv cov khoom vaj khoom tsev teeb tsa "Pib Zaus (Hz)" txog 20-xaiv "Enabled" teb thiab nyem rau ntawm tus pin cim thiab xaiv "Boolean SinkPin"
  • Txuas Arduino tus pin [8] rau "ChangeOnly1" tus pin [Hauv]
  • Txuas "ChangeOnly1" tus pin [Tawm] rau "PlayFrequency1" tus pin [Enabled]
  • Txuas "PlayFrequency1" tus pin [Tawm] rau Arduino tus lej digital [7]

Kauj Ruam 5: Tsim, Ua Ke, thiab Tshaj Tawm Arduino Code

Tsim, Sau, thiab Tso Tawm Arduino Code
Tsim, Sau, thiab Tso Tawm Arduino Code

Hauv Visuino, hauv qab nyem rau ntawm "Tsim" Tab, xyuas kom tseeb tias qhov chaw nres nkoj raug xaiv, tom qab ntawd nyem rau ntawm "Compile/Build and Upload" khawm.

Kauj ruam 6: Ua si

Yog tias koj ua lub zog Arduino UNO module, thiab ua kom txav mus rau PIR sensor yuav tsum ntsuas nws thiab lub suab nrov nrov yuav ua suab nrov.

Nrog koj zoo siab! Koj tau ua tiav koj txoj haujlwm nrog Visuino. Kuj txuas nrog yog Visuino project, uas kuv tau tsim rau Cov Lus Qhia no, koj tuaj yeem rub tawm nws ntawm no thiab qhib nws hauv Visuino:

Pom zoo: