Cov txheej txheem:

Visuino - Kev Tiv Thaiv Ib puag ncig Nrog Laser Ntes Siv Arduino: 7 Kauj Ruam
Visuino - Kev Tiv Thaiv Ib puag ncig Nrog Laser Ntes Siv Arduino: 7 Kauj Ruam

Video: Visuino - Kev Tiv Thaiv Ib puag ncig Nrog Laser Ntes Siv Arduino: 7 Kauj Ruam

Video: Visuino - Kev Tiv Thaiv Ib puag ncig Nrog Laser Ntes Siv Arduino: 7 Kauj Ruam
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Hlis ntuj nqeg
Anonim
Image
Image
Visuino - Kev Tiv Thaiv Ib puag ncig Nrog Laser Ntes Siv Arduino
Visuino - Kev Tiv Thaiv Ib puag ncig Nrog Laser Ntes Siv Arduino

Hauv qhov kev qhia no peb yuav siv daim duab thev naus laus zis thev naus laus zis, teeb duab laser, LED, Buzzer, Arduino Uno thiab Visuino txhawm rau txheeb xyuas thaum lub nqaj los ntawm lub laser tau cuam tshuam. Saib daim vis dis aus.

Nco tseg: Photoresistors yog ib ntawm cov neeg nyiam tshaj plaws teeb pom kev zoo qib rau Arduino. Lawv yooj yim siv, thiab tseem, muaj qee qhov xav tsis thoob, tshwj xeeb tshaj yog thaum peb sim siv cov qauv npaj tau tsim los ntawm lwm tus.

CEEB TOOM !!!

Tsis txhob taw tes LASER rau koj lub qhov muag lossis lwm tus li nws tuaj yeem ua rau muaj kev phom sij heev!

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
  • Laser module
  • yees duab resistor module
  • Arduino UAS
  • Buzzer
  • Jumper xov hlau
  • YELLOW LED (lossis lwm yam xim)
  • Visuino program: Rub tawm Visuino

Kauj ruam 2: Circuit Court

Qhov Circuit
Qhov Circuit

Txuas GND los ntawm Arduino mus rau tus pin breadboard (-)

Txuas 5V los ntawm Arduino mus rau tus pin breadboard (+)

Txuas Buzzer tus pin (+) rau Arduino tus lej digital (11)

Txuas Buzzer tus pin (-) rau tus pin breadboard (-)

Txuas tus pin LED (-) rau tus pin breadboard (-)

Txuas LED tus pin (+) rau Arduino tus lej digital (13)

Txuas Laser module tus pin (-) rau tus pin breadboard (-)

Txuas Laser tus lej pin (+) rau tus pin breadboard (+) NCO TSEG: hauv kuv cov ntaub ntawv nws tau cim nrog "S" (nyob ntawm hom qauv)

Txuas tus yees duab resistor module tus pin (-) rau breadboard tus pin (-)

Txuas tus yees duab resistor module tus pin (+) mus rau lub khob cij pin (+)

Txuas tus yees duab resistor module tus pin (S) rau Arduino analog pin (A0)

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 Cov Lus Qhia no teeb tsa Arduino IDE rau program ESP 8266!

Visuino: https://www.visuino.eu tseem yuav tsum tau teeb tsa.

Pib Visuino raws li qhia hauv daim duab thawj

Nyem rau ntawm "Cov cuab yeej" khawm ntawm Arduino tivthaiv (Daim Duab 1) hauv Visuino Thaum cov lus 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 SubtractFromValue tivthaiv teeb tsa tus nqi rau 1

Ntxiv CompareAnalogValue tivthaiv teeb tsa tus nqi rau 0.9 (koj tuaj yeem hloov tus lej no kom pom "qhov chaw qab zib")

Ntxiv Buzzer tivthaiv

Kauj Ruam 5: Hauv Visuino: Txuas Cov Khoom Siv

  • Txuas Arduino Analog tus pin [0] rau SubtractFromValue1 tus pin [hauv]
  • Txuas SubtractFromValue1 tus pin [tawm] rau CompareAnalogValue1 tus pin [hauv]
  • Txuas SubtractFromValue1 tus pin [tawm] rau CompareAnalogValue1 tus pin [hauv]
  • Txuas SubtractFromValue1 tus pin [tawm] rau Arduino tus lej txuas [hauv]
  • Sib pivAnalogValue1 tus pin [tawm] rau Buzzer1 tus pin [hauv]
  • Sib pivAnalogValue1 tus pin [tawm] rau Arduino tus lej digital [13]
  • Buzzer1 tus pin [tawm] rau Arduino tus lej digital [11]

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, lub suab nrov yuav pib nrov nrov, tsom mus rau lub teeb nqaj laser rau yees duab tiv thaiv thiab nws yuav tsum tsis txhob nrov nrov. Tam sim no nws tau npaj tiav, thaum twg lub nqaj yuav cuam tshuam lub suab nrov yuav pib nrov nrov (tus neeg nkag nkag tau pom).

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 qhov Qhia Qhia no.

Koj tuaj yeem rub tawm thiab qhib nws hauv Visuino:

Pom zoo: