Cov txheej txheem:

Tshuaj tua yoov tshaj cum Arduino: 6 Kauj Ruam
Tshuaj tua yoov tshaj cum Arduino: 6 Kauj Ruam

Video: Tshuaj tua yoov tshaj cum Arduino: 6 Kauj Ruam

Video: Tshuaj tua yoov tshaj cum Arduino: 6 Kauj Ruam
Video: HMONG World Mosquito Destroyer 2024, Kaum ib hlis
Anonim

Hauv qhov kev qhia no peb yuav kawm paub yuav ua li cas thiaj tua tau yoov tshaj cum yooj yim siv arduino thiab piezo buzzer. Lub suab nrov yuav tawm suab ntsiag to (rau tib neeg pob ntseg) zaus ntawm 31kHz, qhov zaus no tau paub tias yuav tua cov yoov tshaj cum thiab koj tuaj yeem kho qhov zaus rau qhov koj xav tau ib yam nkaus. Saib cov vis dis aus!

Kauj ruam 1: Yam Koj Yuav Tsum Tau

Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
  • Arduino Uno lossis lwm lub Rooj Tswjhwm Saib Arduino
  • Piezo buzzer
  • Jumper xov hlau
  • Visuino software: Rub tawm ntawm no

Kauj ruam 2: Circuit Court

Qhov Circuit
Qhov Circuit
  • Txuas Piezo buzzer tus lej zoo + (VCC) rau Arduino tus pin + 5V
  • Txuas Piezo buzzer tus lej tsis zoo - (GND) rau Arduino tus pin GND
  • Txuas Piezo buzzer teeb liab tus pin (S) rau Arduino tus pin 2

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

Visuino: https://www.visuino.eu tseem yuav tsum tau teeb tsa. Rub tawm Dawb version lossis sau npe rau Kev Sim Dawb.

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 & Txuas Txuas

Hauv Visuino Ntxiv & Txuas Cov Khoom Siv
Hauv Visuino Ntxiv & Txuas Cov Khoom Siv
Hauv Visuino Ntxiv & Txuas Cheeb Tsam
Hauv Visuino Ntxiv & Txuas Cheeb Tsam
Hauv Visuino Ntxiv & Txuas Cheeb Tsam
Hauv Visuino Ntxiv & Txuas Cheeb Tsam
  • Ntxiv "Ua Si Zaus Tone" tivthaiv
  • Xaiv "PlayFrequency1" thiab Hauv cov khoom qhov rai teeb tsa "Pib Zaus (Hz)" txog 31000
  • Txuas "PlayFrequency1" tiv thaiv tus pin tawm rau Arduino tus lej digital 2

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 tus qauv, lub piezo buzzer yuav pib tso tawm 31kHz zaus uas tau paub los tua yoov tshaj cum. Koj tuaj yeem kho qhov zaus yog tias koj xav tau.

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

Pom zoo: