Cov txheej txheem:

Arduino Tub Ceev Xwm Siren Nrog LED Teeb Tub Ceev Xwm - Qhia: 7 Kauj Ruam
Arduino Tub Ceev Xwm Siren Nrog LED Teeb Tub Ceev Xwm - Qhia: 7 Kauj Ruam

Video: Arduino Tub Ceev Xwm Siren Nrog LED Teeb Tub Ceev Xwm - Qhia: 7 Kauj Ruam

Video: Arduino Tub Ceev Xwm Siren Nrog LED Teeb Tub Ceev Xwm - Qhia: 7 Kauj Ruam
Video: Tub Ceev Xwm Nrhiav Kev Hlub (Hmong Dubbed) 2024, Hlis ntuj nqeg
Anonim
Image
Image

Hauv qhov kev qhia no peb yuav kawm paub yuav ua li cas tus tub ceev xwm siren nrog teeb nyem coj xiav thiab liab.

Saib daim 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
  • Arduino UNO (lossis lwm yam Arduino)
  • 2x RGB LED (Yog tias koj tsis muaj nws tsuas yog siv ib txwm LEDs xiav thiab liab)
  • Piezo buzzer
  • Jumper xov hlau
  • Visuino program: Rub tawm Visuino

Kauj ruam 2: Circuit Court

Qhov Circuit
Qhov Circuit
  • Txuas ob qho tib si RGB LED tus pin [-] rau Arduino tus pin [GND]
  • Txuas thawj RGB LED tus pin [R] rau Arduino tus pin [5]
  • Txuas tus thib ob RGB LED tus pin [B] rau Arduino tus pin [6]
  • Txuas Piezo Buzzer tus pin [S] rau Arduino tus pin [8]
  • Txuas Piezo Buzzer tus pin [-] rau Arduino tus pin [GND]
  • Txuas Piezo Buzzer tus pin [+] rau Arduino tus pin [5V]

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 Cheebtsam

hauv Visuino Ntxiv Cheebtsam
hauv Visuino Ntxiv Cheebtsam
hauv Visuino Ntxiv Cheebtsam
hauv Visuino Ntxiv Cheebtsam
hauv Visuino Ntxiv Cheebtsam
hauv Visuino Ntxiv Cheebtsam

Ntxiv "Sine Analog Generator" tivthaiv Hauv cov khoom qhov rai teeb tsa Amplitude rau 300, Zaus rau 0.5 thiab Offset rau 600

  • Ntxiv "Ua Si Zaus Tone" tivthaiv
  • Ntxiv "Pulse Generator" tivthaiv
  • Ntxiv "Pulse Generator" tivthaiv

Kauj Ruam 5: Hauv Visuino Connect Components

Hauv Visuino Connect Components
Hauv Visuino Connect Components
  • Txuas "SineAnalogGenerator1" tus pin [Tawm] rau "PlayFrequency1" tus pin [Hauv]
  • Txuas "PlayFrequency1" tus pin [Tawm] rau Arduino board digital pin [8]
  • Txuas "PulseGenerator1" tus pin [Tawm] rau Arduino board digital pin [5]
  • Txuas "PulseGenerator1" tus pin [Tawm] rau "Inverter1" tus pin [Hauv]
  • Txuas "Inverter1" tus pin [Tawm] rau Arduino board digital pin [6]

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

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

Hauv Visuino, Nias F9 lossis nyem rau ntawm lub pob uas qhia ntawm daim duab 1 los tsim Arduino code, thiab qhib Arduino IDE

Hauv Arduino IDE, nyem rau ntawm Upload khawm, txhawm rau sau thiab xa cov cai (Daim duab 2)

Kauj ruam 7: Ua si

Yog tias koj ua lub zog Arduino UNO module, LED yuav pib nyem thiab koj yuav tsum hnov lub 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: