Cov txheej txheem:

Tswj DC Tsav Nrog Encoder Optical Sensor Module FC-03: 7 Cov Kauj Ruam
Tswj DC Tsav Nrog Encoder Optical Sensor Module FC-03: 7 Cov Kauj Ruam

Video: Tswj DC Tsav Nrog Encoder Optical Sensor Module FC-03: 7 Cov Kauj Ruam

Video: Tswj DC Tsav Nrog Encoder Optical Sensor Module FC-03: 7 Cov Kauj Ruam
Video: Лучшие часы Casio G Shock Master of G-Топ 5 лучших часов Casio G Shock дл... 2024, Kaum ib hlis
Anonim

Hauv qhov kev qhia no peb yuav kawm paub suav suav kho qhov muag cuam tshuam cuam tshuam nrog siv lub tshuab DC, OLED zaub thiab Visuino.

Saib cov yees duab!

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 UNO (lossis lwm yam Arduino)
  • Optical Coupling Sensor Module FC-03
  • DC tsav
  • Log log (nrog qhov) uas koj txuas rau ntawm DC lub cev muaj zog
  • OLED Zaub
  • Jumper xov hlau
  • Cov qhob cij
  • Visuino program: Rub tawm Visuino

Kauj ruam 2: Circuit Court

Qhov Circuit
Qhov Circuit
  • Txuas OLED Display pin [VCC] rau Arduino tus pin [5V]
  • Txuas OLED Display pin [GND] rau Arduino tus pin [GND]
  • Txuas OLED Display pin [SCL] rau Arduino tus pin [5V]
  • Txuas Encoder FC-03 tus pin [VCC] rau Arduino tus pin [5V]
  • Txuas tus lej nkag FC-03 tus pin [GND] rau Arduino tus pin [GND]
  • Txuas Encoder FC-03 tus pin [D0] rau Arduino tus pin [10]
  • Txuas fais fab mov [3-6V] rau DC lub cev muaj zog

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 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 4: Hauv Visuino ADD thiab Teeb Khoom

Hauv Visuino ADD thiab Teeb Khoom
Hauv Visuino ADD thiab Teeb Khoom
Hauv Visuino ADD thiab Teeb Khoom
Hauv Visuino ADD thiab Teeb Khoom
Hauv Visuino ADD thiab Teeb Khoom
Hauv Visuino ADD thiab Teeb Khoom

Ntxiv "SSD1306/SH1106 OLED Display (I2C)" tivthaiv

Ob npaug nias rau ntawm "DisplayOLED1" tivthaiv thiab:

nyob rau hauv Elements window rub "Kos Cov Ntawv" rau sab laug, Ntawm sab laug xaiv Kos Duab 1 thiab hauv cov khoom qhov rai teeb tsa me me rau 2 thiab ntawv: STEPS

nyob rau hauv Elements window drag "Text Field" mus rau sab laug Ntawm sab laug xaiv TextField1 thiab hauv cov khoom qhov rai teeb tsa qhov loj me rau 3 thiab Y: 30 Kaw cov ntsiab lus qhov rai

Ntxiv "Counter" tivthaiv

Xaiv Counter1 tivthaiv thiab hauv cov khoom qhov rai teeb tsa Min> Tus nqi rau 0

Kauj Ruam 5: 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 Arduino board digital pin [10] rau Counter1 tus pin [Hauv]
  • Txuas Counter1 tus pin [Tawm] rau DisplayOLED1> TextField1 tus pin [Hauv]
  • Txuas DisplayOLED1 I2C tus pin [Tawm] rau Arduino board tus pin I2C [Hauv]

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

Yog tias koj ua lub zog Arduino UNO module, thiab txuas DC lub zog rau lub zog siv los ua nws lub OLED zaub yuav tsum qhia tus lej cuam tshuam (suav).

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: