Cov txheej txheem:

DC MOTOR Tes Tes Taw Kev Ceev & Kev Qhia Siv Arduino: 8 Kauj Ruam
DC MOTOR Tes Tes Taw Kev Ceev & Kev Qhia Siv Arduino: 8 Kauj Ruam

Video: DC MOTOR Tes Tes Taw Kev Ceev & Kev Qhia Siv Arduino: 8 Kauj Ruam

Video: DC MOTOR Tes Tes Taw Kev Ceev & Kev Qhia Siv Arduino: 8 Kauj Ruam
Video: 5-дневное путешествие на поезде через 3 000 км на север и юг Японии по очень низкой цене. (Кюсю) 2024, Hlis ntuj nqeg
Anonim
Image
Image

Hauv qhov kev qhia no peb yuav kawm paub tswj DC lub tshuab nrog tes taw siv arduino thiab Visuino.

Saib cov yees duab!

Kuj txheeb xyuas qhov no: Qhia piav tes piav tes

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 UNO (lossis lwm lub rooj tsavxwm)

  • APDS9960 sib thooj taw tes piav tes piav tes
  • L298N DC MOTOR CONTROLER tsav tsheb
  • OLED Zaub
  • Roj teeb
  • DC Tsav
  • Cov qhob cij
  • 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 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)
  • Txuas Sensor Pin [GND] rau Arduino board pin [GND]
  • Txuas Sensor Pin [Vin] rau Arduino board tus pin [3.3V]
  • Txuas Sensor Pin [SDA] mus rau Arduino board pin [SDA]
  • Txuas Sensor Pin [SCL] rau Arduino board pin [SCL]

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

Visuino: https://www.visuino.eu xav tau kev 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 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
  • Ntxiv "Gesture Color Proximity APDS9960 I2C" tivthaiv
  • Ntxiv "Up/Down Counter" tivthaiv
  • Ntxiv "SR Flip-Flop" tivthaiv
  • Ntxiv "Faib Analog Los Ntawm Tus Nqi" tivthaiv
  • Ntxiv "Ceev thiab Taw Qhia Kom Ceev" tivthaiv
  • Ntxiv "Dual DC Tsav Tsav Tsheb Digital thiab PWM Pins Choj (L9110S, L298N)" tivthaiv
  • Ntxiv "Text Value" tivthaiv
  • Ntxiv "SSD1306/SH1106 OLED Display (I2C)" tivthaiv
  • Ntxiv "Ncua Sijhawm" tivthaiv

Kauj Ruam 5: Hauv Visuino Teeb Cov Khoom

Hauv Visuino Teeb Cov Txheej Txheem
Hauv Visuino Teeb Cov Txheej Txheem
Hauv Visuino Teeb Cov Txheej Txheem
Hauv Visuino Teeb Cov Txheej Txheem
Hauv Visuino Teeb Cov Txheej Txheem
Hauv Visuino Teeb Cov Txheej Txheem
  • Xaiv "UpDownCounter1" tivthaiv thiab hauv cov khoom qhov rai teeb tsa Max> tus nqi rau 10
  • Xaiv "UpDownCounter1" tivthaiv thiab hauv cov khoom qhov rai teeb tsa Min> tus nqi rau 0
  • Xaiv "DivideByValue1" tivthaiv thiab hauv cov khoom qhov rai teeb tsa tus nqi rau 10
  • Xaiv "SpeedAndDirectionToSpeed1" tivthaiv thiab nyob rau hauv lub qhov rai khoom teeb tsa Pib Rov Qab Mus Rau Qhov Tseeb, thiab Pib Ceev rau 1
  • Xaiv "Delay1" tivthaiv thiab nyob rau hauv lub qhov rai khoom teeb tsa tuaj yeem rov qab mus rau qhov tsis raug thiab Lub Sijhawm (uS) txog 1000000
  • Ob npaug nias rau ntawm "TextValue1" tivthaiv thiab hauv Elements window rub 4X "Teeb Tus Nqi" mus rau sab laug
  • Ntawm sab laug xaiv "Teeb Tus Nqi 1" thiab hauv cov khoom qhov rai teeb tus nqi rau "FASTER"
  • Ntawm sab laug xaiv "Teeb Tus Nqi 2" thiab hauv cov khoom vaj khoom tsev teeb tus nqi rau "SLOWER"
  • Ntawm sab laug xaiv "Teeb Tus Nqi 3" thiab hauv lub qhov rai khoom teeb tsa Tus nqi rau "LEFT"
  • Ntawm sab laug xaiv "Teeb Tus Nqi 4" thiab hauv cov khoom qhov rai teeb tus nqi rau "RIGHT"
  • Kaw lub Elements window
  • Ob npaug nias rau ntawm "DisplayOLED1" tivthaiv thiab hauv Elements luag "Text Field" mus rau sab laug thiab "Fill Screen" mus rau sab laug
  • Ntawm sab laug xaiv "Text Field1" thiab hauv cov khoom qhov rai teeb tsa me me rau 3
  • Kaw lub Elements window

Kauj Ruam 6: Hauv Visuino Connect Components

Hauv Visuino Connect Components
Hauv Visuino Connect Components
Hauv Visuino Connect Components
Hauv Visuino Connect Components
Hauv Visuino Connect Components
Hauv Visuino Connect Components
Hauv Visuino Connect Components
Hauv Visuino Connect Components

Txuas "GestureColorProximity1" tus pin Gesture> Mus txog "UpDownCounter1" tus pin Up

Txuas "GestureColorProximity1" tus pin Gesture> Mus txog "TextValue1> Teeb Tus Nqi1" tus pin Hauv

  • Txuas "GestureColorProximity1" tus pin Gesture> nqes mus rau "UpDownCounter1" tus pin Down
  • Txuas "GestureColorProximity1" tus pin Gesture> nqes mus rau "TextValue1> Teeb Tus Nqi 2" tus pin Hauv
  • Txuas "GestureColorProximity1" tus pin Gesture> Sab laug rau "SRFlipFlop1" tus pin teeb
  • Txuas "GestureColorProximity1" tus pin Gesture> Sab laug rau "TextValue1> Teeb Tus Nqi 3" tus pin Hauv
  • Txuas "GestureColorProximity1" tus pin Gesture> Txoj cai rau "SRFlipFlop1" tus pin rov pib dua
  • Txuas "GestureColorProximity1" tus pin Gesture> Txoj cai rau "TextValue1> Teeb Tus Nqi 4" tus pin Hauv
  • Txuas "GestureColorProximity1" tus pin Tswj I2C rau Arduino board tus pin I2C Hauv
  • Txuas "UpDownCounter1" tus pin tawm mus rau "DivideByValue1" tus pin Hauv
  • Txuas "DivideByValue1" tus pin tawm mus rau "SpeedAndDirectionToSpeed1" tus pin nrawm
  • Txuas "SRFlipFlop1" tus pin tawm mus rau "SpeedAndDirectionToSpeed1" tus pin thim rov qab
  • Txuas "SpeedAndDirectionToSpeed1" pin Out to "DualMotorDriver1" Motors [0]> Hauv
  • Txuas "DualMotorDriver1" Cov Tsav Tsheb [0] tus pin Taw qhia (B) rau Arduino board digital pin 2
  • Txuas "DualMotorDriver1" Cov Tsav Tsheb [0] tus pin nrawm (A) rau Arduino board digital pin 3
  • Txuas "TextValue1" pin Out to "DisplayOLED1"> Text Field1> Clock
  • Txuas "TextValue1" pin Out to "DisplayOLED1"> Text Field1> In
  • Txuas "TextValue1" pin Out to "Delay1" pin Start
  • Txuas "Delay1" tus pin tawm mus rau "DisplayOLED1"> Sau Screen1> Clock
  • Txuas "DisplayOLED1" tus pin Tawm I2C rau Arduino board tus pin I2C Hauv

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

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

Yog tias koj ua lub zog Arduino UNO tus qauv, thiab ua tus taw tes hla qhov taw tes piav tes piav taw lub cev muaj zog yuav pib txav mus thiab OLED Cov Zaub yuav pib qhia Kev Qhia, saib cov vis dis aus kom ntxaws ntxaws.

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 Cov Lus Qhia no, koj tuaj yeem rub nws thiab qhib nws hauv Visuino:

Pom zoo: