Cov txheej txheem:

Arduino Tswj DC Lub Cev Muaj Zog Ceev thiab Kev Qhia Siv Lub Voj Potentiometer: 6 Cov Kauj Ruam
Arduino Tswj DC Lub Cev Muaj Zog Ceev thiab Kev Qhia Siv Lub Voj Potentiometer: 6 Cov Kauj Ruam

Video: Arduino Tswj DC Lub Cev Muaj Zog Ceev thiab Kev Qhia Siv Lub Voj Potentiometer: 6 Cov Kauj Ruam

Video: Arduino Tswj DC Lub Cev Muaj Zog Ceev thiab Kev Qhia Siv Lub Voj Potentiometer: 6 Cov Kauj Ruam
Video: REAL RACING 3 LEAD FOOT EDITION 2024, Kaum ib hlis
Anonim
Image
Image

Hauv qhov kev qhia no peb yuav kawm paub siv L298N DC MOTOR CONTROL tus neeg tsav tsheb thiab lub hwj chim kom tswj tau DC lub zog tsav thiab kev taw qhia.

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
  • Arduino UAS
  • L298N DC MOTOR CONTROLER
  • DC Tsav
  • Roj teeb pob
  • Potentiometer
  • Jumper xov hlau
  • Visuino program: Rub tawm Visuino

Kauj ruam 2: Circuit Court

Qhov Circuit
Qhov Circuit
  • Txuas tus lej digital (2) los ntawm Arduino mus rau tus tsav tsav tus pin (IN2)
  • Txuas tus lej digital (3) los ntawm Arduino mus rau tus tsav tsav tus pin (IN1)
  • Txuas DC ib lub cav mus rau ib sab ntawm tus tsav tsheb
  • Txuas Cov Khoom Siv Hluav Taws Xob (roj teeb) tus pin (gnd) rau tus tsav tsheb tswj tus pin (gnd)
  • Txuas Cov Khoom Siv Hluav Taws Xob (roj teeb) tus pin (+) rau tus tsav tsheb tsav tus pin (+)
  • Txuas GND los ntawm Arduino mus rau tus tsav tsheb tswj tus pin (gnd)
  • Txuas tus pin potentiometer (DTB) rau Arduino Analog tus pin (A0)
  • Txuas tus pin potentiometer (VCC) rau Arduino tus pin (5V)
  • Txuas tus pin potentiometer (GND) rau Arduino tus pin (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 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 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 THIAB Txuas Cov Khoom Siv

Hauv Visuino Ntxiv THIAB Txuas Cov Khoom Siv
Hauv Visuino Ntxiv THIAB Txuas Cov Khoom Siv
  • Ntxiv "Dual DC Tsav Tsav Tsheb Digital thiab PWM Pins Choj (L9110S, L298N)" tivthaiv
  • Txuas Arduino AnalogIn [0] rau DualMotorDriver1mptors [0] tus pin [Hauv]
  • Txuas DualMotorDriver1 tus pin Taw qhia [B] rau Arduino tus pin [2]
  • Txuas DualMotorDriver1 tus pin nrawm [A] rau Arduino tus pin [3]

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

Yog tias koj ua lub zog Arduino Uno module thiab ntxiv roj teeb rau kev tswj lub cev muaj zog, DC lub cav tau npaj txhij tig.

Los ntawm zawv zawg potentiometer koj tuaj yeem tswj lub cav nrawm thiab hloov kev taw qhia. Qhov chaw nres tsheb yog nyob nruab nrab ntawm lub hwj chim thiab yog tias koj xaub nws mus rau sab laug nws yuav mus rau ib qho kev taw qhia thiab yog tias koj xaub nws mus rau sab xis nws yuav mus rau lwm txoj kev.

Nrog koj zoo siab! Koj tau ua tiav koj Txoj Haujlwm. Kuj txuas nrog yog Visuino qhov haujlwm, uas kuv tau tsim rau qhov Qhia Qhia no. Koj tuaj yeem rub nws ntawm no thiab qhib nws hauv Visuino:

Pom zoo: