Cov txheej txheem:

Rotate Sand CLOCK Txhua feeb Siv Servo Motor - Arduino: 8 Kauj Ruam
Rotate Sand CLOCK Txhua feeb Siv Servo Motor - Arduino: 8 Kauj Ruam

Video: Rotate Sand CLOCK Txhua feeb Siv Servo Motor - Arduino: 8 Kauj Ruam

Video: Rotate Sand CLOCK Txhua feeb Siv Servo Motor - Arduino: 8 Kauj Ruam
Video: TUDev's Tech Talk with Professor Bora Ozkan - Fintech and the Future of Finance 2024, Kaum ib hlis
Anonim

Hauv qhov kev qhia no peb yuav kawm paub yuav ua li cas tig lub me me (1 feeb) xuab zeb moos txhua 60s siv servo motor thiab Visuino, 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
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
  • Arduino UNO (lossis lwm yam Arduino)
  • Xuab zeb moos
  • Servo tsav
  • qee cov xaim me me lossis kua nplaum los txuas lub moos rau lub tshuab
  • jumper cov xov hlau
  • Visuino program: Rub tawm Visuino

Kauj ruam 2: Circuit Court

Qhov Circuit
Qhov Circuit
  • Txuas Servo motor "Txiv kab ntxwv" tus pin rau Arduino Digital tus pin [2]
  • Txuas Servo motor "Liab" tus pin rau Arduino tus pin zoo [5V]
  • Txuas Servo motor "Brown" tus pin rau Arduino tus pin tsis zoo [GND]

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
  • Ntxiv "Clock Generator" tivthaiv
  • Ntxiv "Toggle (T) Flip-Flop" tivthaiv
  • Ntxiv "Analog Value" tivthaiv
  • Ntxiv "Servo" tivthaiv

Kauj Ruam 5: Hauv Visuino Teeb Cov Khoom

Hauv Visuino Teeb Cov Txheej Txheem
Hauv Visuino Teeb Cov Txheej Txheem
Hauv Visuino Teeb Cov Txheej Txheem
Hauv Visuino Teeb Cov Txheej Txheem
  • Xaiv "ClockGenerator1" thiab hauv cov khoom qhov rai teeb tsa "Zaus" rau: 0.0166667 << qhov no yog 60s, koj tuaj yeem hloov tus lej yog tias koj xav tau
  • Xaiv "AnalogValue1" thiab hauv cov khoom qhov rai teeb tsa "Tus nqi" rau 1
  • Nyem ob npaug rau "AnalogValue1" thiab hauv cov ntsiab lus qhov rai rub 2X 'Teeb Tus Nqi' mus rau sab laug Xaiv 'Teeb Tus Nqi 2' thiab hauv cov khoom qhov rai teeb tsa "Tus nqi" rau 1

Kauj Ruam 6: Hauv Visuino Connect Components

Hauv Visuino Connect Components
Hauv Visuino Connect Components
  • Txuas "ClockGenerator1" tus pin [Tawm] rau "TFlipFlop1" tus pin [moos]
  • Txuas "TFlipFlop1" tus pin [Tawm] rau "AnalogValue1"> "Teeb Tus Nqi0" tus pin [Hauv]
  • Txuas "TFlipFlop1" tus pin [Inverted] rau "AnalogValue1"> "Teeb Tus Nqi1" tus pin [Hauv]
  • Txuas "AnalogValue1" tus pin [Tawm "rau" Servo1 "tus pin [Hauv]
  • Txuas "Servo1" tus pin [Tawm] rau Arduino board digital pin [2]

Kauj Ruam 7: 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 8: Ua si

Yog tias koj siv zog Arduino UNO module, lub cav servo yuav tig lub xuab zeb xuab moos txhua feeb.

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: