Cov txheej txheem:

DIY Yuav Ua Li Cas Tswj Servo Lub Cev Lub Cev Siv Visuino Sequence Component: 10 Cov Kauj Ruam
DIY Yuav Ua Li Cas Tswj Servo Lub Cev Lub Cev Siv Visuino Sequence Component: 10 Cov Kauj Ruam

Video: DIY Yuav Ua Li Cas Tswj Servo Lub Cev Lub Cev Siv Visuino Sequence Component: 10 Cov Kauj Ruam

Video: DIY Yuav Ua Li Cas Tswj Servo Lub Cev Lub Cev Siv Visuino Sequence Component: 10 Cov Kauj Ruam
Video: ОТКРОЙТЕ ВОЛШЕБНУЮ СТОРОНУ ТЕЛА, СТАНОВЯЮЩУЮСЯ ИЗ-ЗА ЧРЕЗВЫЧАЙНОЙ ТРЕВОГИ НОЧЬЮ 2024, Kaum ib hlis
Anonim

Hauv qhov kev qhia no peb yuav siv Servo Motor thiab Arduino UNO, thiab Visuino los tswj servo motor Angle siv ntu ntu. Qhov ntu tivthaiv yog qhov zoo tshaj rau cov xwm txheej uas peb xav ua kom muaj ntau yam xwm txheej nyob rau hauv peb cov ntaub ntawv servo motor degrees.

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
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi
  • Arduino UNO (lossis lwm yam Arduino)
  • Jumper xov hlau
  • Servo tsav
  • Visuino program: Rub tawm Visuino

Kauj ruam 2: Circuit Court

Qhov Circuit
Qhov Circuit
Qhov Circuit
Qhov Circuit
  • Txuas Servo motor "Txiv kab ntxwv" tus pin rau Arduino Digital tus pin [8]
  • 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:

Duab
Duab
Duab
Duab

Txhua yam koj yuav tsum tau ua yog rub thiab tso cov khoom sib txuas thiab Txuas lawv ua ke. Visuino yuav tsim txoj cai ua haujlwm rau koj yog li koj tsis tas yuav nkim sijhawm los tsim cov cai. Nws yuav ua txhua txoj haujlwm nyuaj rau koj sai thiab yooj yim! Visuino zoo tshaj plaws rau txhua txoj haujlwm, koj tuaj yeem tsim cov phiaj xwm nyuaj nyob rau lub sijhawm!

Rub tawm Qhov Tseeb Muaj Zog Visuino Software

Kauj Ruam 4: 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 5: Hauv Visuino Ntxiv Cheebtsam

Hauv Visuino Ntxiv Cheebtsam
Hauv Visuino Ntxiv Cheebtsam
  • Ntxiv "Sequence" tivthaiv
  • Ntxiv 5x "Analog Value" tivthaiv
  • Ntxiv "Analog Multi Merger" tivthaiv
  • Ntxiv "Faib Analog Los Ntawm Tus Nqi" tivthaiv
  • Ntxiv "Servo" tivthaiv

Kauj Ruam 6: Hauv Visuino Teeb Cov Khoom

Hauv Visuino Teeb Cov Txheej Txheem
Hauv Visuino Teeb Cov Txheej Txheem

Xaiv "Sequence1" tivthaiv, ob npaug nias rau nws. Hauv "Elements" Dialog: Drag 5X "Period" element mus rau sab laug.

  • Xaiv "Lub Sijhawm 1" lub ntsiab lus thiab hauv qab qhov khoom tsim teeb tsa "Ncua" rau "1000"
  • Xaiv "Lub Sijhawm 2" ntu thiab hauv qab qhov khoom tsim teeb tsa "Ncua" rau "2000"
  • Xaiv "Lub Sijhawm 3" ntu thiab hauv qab qhov khoom tsim teeb tsa "Ncua" rau "3000"
  • Xaiv "Lub Sijhawm 4" ntu thiab hauv qab qhov khoom tsim teeb tsa "Ncua" rau "4000"
  • Xaiv "Lub Sijhawm 5" lub ntsiab lus thiab hauv cov khoom qhov rai teeb tsa "Ncua" mus rau "5000" >> qhov no yuav siv rau ncua sijhawm kawg.

Tam sim no cia teeb Degrees rau servo motor: Xaiv "AnalogValue1" tivthaiv thiab hauv qab qhov khoom qhov rai teeb tsa "Tus nqi" rau "0"

Xaiv "AnalogValue2" tivthaiv thiab hauv cov khoom qhov rai teeb tsa "Tus nqi" rau "60"

Xaiv "AnalogValue3" tivthaiv thiab nyob rau hauv cov khoom qhov rai teeb tsa "Tus nqi" rau "120"

Xaiv "AnalogValue4" tivthaiv thiab hauv cov khoom qhov rai teeb tsa "Tus nqi" rau "180"

Xaiv "AnalogMultiMerger1" tivthaiv thiab hauv qab qhov khoom tsim qhov teeb tsa "Cov tswv yim pins" rau "4"

Xaiv "DivideByValue1" tivthaiv thiab hauv cov khoom qhov rai teeb tsa "tus nqi" rau "180"

Kauj Ruam 7: Hauv Visuino Connect Components

Hauv Visuino Connect Components
Hauv Visuino Connect Components
  • Txuas "Sequence1"> Period1 tus pin [Tawm] mus rau "AnalogValue1" tus pin [moos]
  • Txuas "Sequence2"> Sijhawm 1 tus pin [Tawm] mus rau "AnalogValue2" tus pin [moos]
  • Txuas "Sequence3"> Sijhawm 1 tus pin [Tawm] mus rau "AnalogValue3" tus pin [moos]
  • Txuas "Sequence4"> Sijhawm 1 tus pin [Tawm] mus rau "AnalogValue4" tus pin [moos]
  • Txuas "AnalogValue1" tus pin [Tawm] mus rau "AnalogMultiMerger1" tus pin [0]
  • Txuas "AnalogValue2" tus pin [Tawm] mus rau "AnalogMultiMerger1" tus pin [1]
  • Txuas "AnalogValue3" tus pin [Tawm] mus rau "AnalogMultiMerger1" tus pin [2]
  • Txuas "AnalogValue4" tus pin [Tawm] mus rau "AnalogMultiMerger1" tus pin [3]
  • Txuas "AnalogMultiMerger1" tus pin [Tawm] rau "DivideByValue1" tus pin [Hauv]
  • Txuas "DivideByValue1" tus pin [Tawm] rau "Servo1" tus pin [Hauv]

Txuas "Servo1" tus pin [Tawm] rau Arduino tus lej digital [8]

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

Yog tias koj siv zog Arduino UNO module, Servo lub cev muaj zog yuav pib txav mus raws qib koj tau teev tseg.

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:

Kauj Ruam 10: Lwm Yam Visuino Tutorials

Nyem rau qhov no thiab ntawm no kom pom lwm Visuino Tutorials.

Pom zoo: