Cov txheej txheem:

DC Lub Cev Pib Pib, Ceev thiab Kev Taw Qhia Siv Tus Kheej Potentiometer, OLED Zaub & Khawm: 6 Cov Kauj Ruam
DC Lub Cev Pib Pib, Ceev thiab Kev Taw Qhia Siv Tus Kheej Potentiometer, OLED Zaub & Khawm: 6 Cov Kauj Ruam

Video: DC Lub Cev Pib Pib, Ceev thiab Kev Taw Qhia Siv Tus Kheej Potentiometer, OLED Zaub & Khawm: 6 Cov Kauj Ruam

Video: DC Lub Cev Pib Pib, Ceev thiab Kev Taw Qhia Siv Tus Kheej Potentiometer, OLED Zaub & Khawm: 6 Cov Kauj Ruam
Video: Leej Muam Dai Siab official audio by Dang Thao & J Vang 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 zog ntsuas kom tswj tau DC lub cav kom pib zoo, nrawm thiab taw qhia nrog ob lub nyees khawm thiab tso saib tus nqi zog ntawm OLED Display.

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 UAS
  • L298N DC MOTOR CONTROLER
  • DC Tsav
  • OLED Zaub
  • Roj teeb pob
  • Potentiometer
  • Jumper xov hlau
  • Ob lub laub khawm
  • 2 x 1K ohm resistor
  • Cov qhob cij
  • Visuino program: Rub tawm Visuino

Kauj ruam 2: Circuit Court

Qhov Circuit
Qhov Circuit
  • Txuas khawm 1 tus lej thib ob rau arduino tus lej digital 6
  • Txuas khawm 1 tus pin thib ob rau tus tiv thaiv 1
  • Txuas khawm 2 thawj tus pin rau breadboard tus lej zoo (kab liab)
  • Txuas khawm 2 tus lej thib ob rau arduino tus lej digital 7
  • Txuas khawm 2 tus lej thib ob rau tus tiv thaiv 2
  • Txuas resistor1 rau breadboard tus pin tsis zoo (kab xiav)
  • Txuas resistor2 rau breadboard tsis zoo tus pin (kab xiav)
  • 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)
  • Txuas OLED Display pin (GND) rau Arduino tus pin (GND)
  • Txuas OLED Display pin (VCC) rau Arduino tus pin (5V)
  • Txuas OLED Display pin (SCL) rau Arduino tus pin (SCL)
  • Txuas OLED Display pin (SDA) rau Arduino tus pin (SDA)

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
Hauv Visuino Ntxiv THIAB Txuas Cov Khoom Siv
Hauv Visuino Ntxiv THIAB Txuas Cov Khoom Siv
Hauv Visuino Ntxiv THIAB Txuas Cov Khoom Siv
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
  • Ntxiv "Ceev thiab Kev Taw Qhia Kom Ceev" tiv thaiv Hauv "Properties window" teeb tsa "Initial Reverse" rau "True"
  • Ntxiv "SR Flip-Flop" tivthaiv Txuas Arduino Board digital pin [6] rau "SRFlipFlop1" tus pin [Teeb]
  • Ntxiv "SSD1306/SH1106 OLED Display (I2C)" tivthaiv ob npaug nyem rau ntawm "DisplayOLED1" thiab hauv cov ntsiab lus qhov rai luag "Text Field" mus rau sab laug thiab hauv cov khoom qhov rai teeb tsa loj: 3, Y: 30
  • Ntxiv "Ramp To Analog Value" tivthaiv
  • Txuas Arduino Board digital pin [7] rau "SRFlipFlop1" tus pin [Pib dua]
  • Txuas Arduino Board AnalogIn tus pin [0] rau "RampToValue1" tus pin [Hauv]
  • Txuas Arduino Board AnalogIn tus pin [0] rau "DisplayOLED1"> Text Field1 tus pin [Hauv]
  • Txuas "RampToValue1" tus pin [Tawm] rau SpeedAndDirectionToSpeed1 tus pin [Ceev]
  • Txuas "DisplayOLED1" pin Out [I2C] rau Arduino board pin I2C
  • Txuas "SRFlipFlop1" tus pin [Tawm] mus rau "SpeedAndDirectionToSpeed1" tus pin [Rov Qab]
  • Txuas "SpeedAndDirectionToSpeed1" tus pin [Tawm] mus rau "DualMotorDriver1"> Cov Motors [0] tus pin [Hauv]
  • Txuas "DualMotorDriver1"> Cov Motors [0] tus pin [Kev Qhia (B] rau Arduino board digital pin [2]
  • Txuas "DualMotorDriver1"> Motors [0] tus pin [Ceev (A)] rau Arduino board digital pin [3]

Kauj Ruam 5: Hauv Visuino, Nias F9 lossis Nyem rau ntawm Khawm Qhia ntawm Daim Duab 1 kom Tsim Tus Qauv Arduino, thiab Qhib Arduino IDE hauv Arduino IDE, Nyem rau ntawm Upload Upload khawm, txhawm rau sau thiab xa cov Cai (Daim Duab 2)

Hauv Visuino, Nias F9 lossis Nyem rau ntawm lub pob uas qhia rau ntawm daim duab 1 kom tsim tau Arduino Code, thiab Qhib Arduino IDE hauv Arduino IDE, Nyem rau ntawm Upload Upload khawm, los ua ke thiab xa cov Code (Duab 2)
Hauv Visuino, Nias F9 lossis Nyem rau ntawm lub pob uas qhia rau ntawm daim duab 1 kom tsim tau Arduino Code, thiab Qhib Arduino IDE hauv Arduino IDE, Nyem rau ntawm Upload Upload khawm, los ua ke thiab xa cov Code (Duab 2)
Hauv Visuino, Nias F9 lossis Nyem rau ntawm lub pob uas qhia rau ntawm daim duab 1 kom tsim tau Arduino Code, thiab Qhib Arduino IDE hauv Arduino IDE, Nyem rau ntawm Upload Upload khawm, los ua ke thiab xa cov Code (Duab 2)
Hauv Visuino, Nias F9 lossis Nyem rau ntawm lub pob uas qhia rau ntawm daim duab 1 kom tsim tau Arduino Code, thiab Qhib Arduino IDE hauv Arduino IDE, Nyem rau ntawm Upload Upload khawm, los ua ke thiab xa cov Code (Duab 2)

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 los ntawm kev thawb cov nyees khawm. Tus nqi potentiometer yuav muab tso rau ntawm OLED Display thiab vim yog "Ramps" tivthaiv, lub tshuab yuav hloov pauv nws nrawm dua. 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: