Cov txheej txheem:

Arduino Tswj DC Lub Cev Muaj Zog Ceev thiab Kev Qhia Siv Potentiometer, OLED Display & Buttons: 6 Cov Kauj Ruam
Arduino Tswj DC Lub Cev Muaj Zog Ceev thiab Kev Qhia Siv Potentiometer, OLED Display & Buttons: 6 Cov Kauj Ruam

Video: Arduino Tswj DC Lub Cev Muaj Zog Ceev thiab Kev Qhia Siv Potentiometer, OLED Display & Buttons: 6 Cov Kauj Ruam

Video: Arduino Tswj DC Lub Cev Muaj Zog Ceev thiab Kev Qhia Siv Potentiometer, OLED Display & Buttons: 6 Cov Kauj Ruam
Video: REAL RACING 3 LEAD FOOT EDITION 2024, Hlis ntuj nqeg
Anonim

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 zog tsav thiab kev 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 Arduino Pin 5V rau lub khob cij zoo (tus kab liab)
  • Txuas Arduino Pin GND rau breadboard tsis zoo tus pin (kab xiav)
  • Txuas khawm 1 tus pin thawj rau lub rooj noj mov zoo tus pin (kab liab)
  • 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
  • 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

Txuas Arduino Board digital pin [7] rau "SRFlipFlop1" tus pin [Pib dua]

  • Txuas Arduino Board AnalogIn tus pin [0] rau "SpeedAndDirectionToSpeed1" tus pin [Ceev]
  • Txuas Arduino Board AnalogIn tus pin [0] rau "DisplayOLED1"> Text Field1 tus pin [Hauv]
  • 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: 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 los ntawm kev thawb cov nyees khawm. Tus nqi potentiometer yuav muab tso rau ntawm OLED Zaub. 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: