Cov txheej txheem:

Visuino Yuav Ua Li Cas Siv Pulse Width Modulation (PWM) los Hloov Qhov Ci ntawm LED: 7 Kauj Ruam
Visuino Yuav Ua Li Cas Siv Pulse Width Modulation (PWM) los Hloov Qhov Ci ntawm LED: 7 Kauj Ruam

Video: Visuino Yuav Ua Li Cas Siv Pulse Width Modulation (PWM) los Hloov Qhov Ci ntawm LED: 7 Kauj Ruam

Video: Visuino Yuav Ua Li Cas Siv Pulse Width Modulation (PWM) los Hloov Qhov Ci ntawm LED: 7 Kauj Ruam
Video: Tus Cwj Pwm Rub Lub Neej Txom Nyem 2024, Hlis ntuj nqeg
Anonim

Hauv qhov kev qhia no peb yuav siv LED txuas nrog Arduino UNO thiab Visuino kom hloov pauv nws qhov ci ci siv Pulse Width Modulation (PWM).

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
  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 (10)

Kauj Ruam 3: VISUINO Tshwj Xeeb Tsab

VISUINO Tshwj Xeeb Tsab
VISUINO Tshwj Xeeb Tsab

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 thiab Txuas

Hauv Visuino Ntxiv Cheebtsam thiab Txuas
Hauv Visuino Ntxiv Cheebtsam thiab Txuas
Hauv Visuino Ntxiv Cheebtsam thiab Txuas
Hauv Visuino Ntxiv Cheebtsam thiab Txuas
Hauv Visuino Ntxiv Cheebtsam thiab Txuas
Hauv Visuino Ntxiv Cheebtsam thiab Txuas
  1. Ntxiv "Sine Analog Generator" tivthaiv
  2. Teeb "SineAnalogGenerator1" tiv thaiv zaus rau "0.2"
  3. Txuas "SineAnalogGenerator1" rau Arduino Digital tus pin [10]

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

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 7:

Yog tias koj siv zog Arduino UNO module, LED yuav maj mam qhib thiab maj mam tig OFF.

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: