Cov txheej txheem:

Visuino RAMPS rau Pulse Width Modulation (PWM) Siv LED: 8 Kauj Ruam
Visuino RAMPS rau Pulse Width Modulation (PWM) Siv LED: 8 Kauj Ruam

Video: Visuino RAMPS rau Pulse Width Modulation (PWM) Siv LED: 8 Kauj Ruam

Video: Visuino RAMPS rau Pulse Width Modulation (PWM) Siv LED: 8 Kauj Ruam
Video: Visuino - Simple, easy and fast integration of Visuino and Delphi 2024, Kaum ib hlis
Anonim
Image
Image
Koj Yuav Tsum Tau Dab Tsi
Koj Yuav Tsum Tau Dab Tsi

Hauv qhov kev qhia no peb yuav siv LED txuas nrog Arduino UNO thiab Visuino kom ua rau lub teeb ci LED siv Pulse Width Modulation (PWM) thiab Ramps tivthaiv.

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
  1. Arduino UNO (lossis lwm yam Arduino)
  2. LED
  3. Visuino program: Rub tawm Visuino

Kauj ruam 2: Circuit Court

Qhov Circuit
Qhov Circuit

Txuas LED tsis zoo (luv) rau Arduino tus pin (GND)

Txuas LED qhov zoo (ntev) rau Arduino tus pin (11)

Kauj ruam 3:

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
Hauv Visuino Ntxiv Cheebtsam
Hauv Visuino Ntxiv Cheebtsam
Hauv Visuino Ntxiv Cheebtsam
Hauv Visuino Ntxiv Cheebtsam
  1. Ntxiv "Analog Value" tivthaiv, teeb tus nqi rau "0"
  2. Ntxiv "Ramp rau Analog Tus Nqi" tivthaiv, teeb tus nqi pib rau "1", teeb Nqes mus rau "0.5"

Kauj Ruam 6: Hauv Visuino Connect Components

Hauv Visuino Connect Components
Hauv Visuino Connect Components
  1. Txuas "AnalogValue1" tiv thaiv tus pin [Tawm] rau RampToValue1 tiv thaiv tus pin [Hauv]
  2. Txuas "RampToValue1" tivthaiv rau Arduino tus pin [11] Analog (PWM)

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

Yog tias koj ua lub zog Arduino UNO module, LED yuav xub qhib rau tom qab ntawd maj mam tig OFF.

Nco tseg:

Tus nqi "0" hauv "Analog Tus Nqi" tivthaiv txiav txim qhov twg yog qhov kawg ntawm LED ci ci, hauv peb cov ntaub ntawv nws OFF yog li "0", ua si nrog nws hloov nws mus rau lwm tus nqi.

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: