Cov txheej txheem:

Arduino Tsheb kauj vab Speedometer Siv GPS: 8 Kauj Ruam
Arduino Tsheb kauj vab Speedometer Siv GPS: 8 Kauj Ruam

Video: Arduino Tsheb kauj vab Speedometer Siv GPS: 8 Kauj Ruam

Video: Arduino Tsheb kauj vab Speedometer Siv GPS: 8 Kauj Ruam
Video: How I Made this Electric Car that can go Anywhere 2024, Hlis ntuj nqeg
Anonim
Image
Image
Arduino Tsheb kauj vab Speedometer Siv GPS
Arduino Tsheb kauj vab Speedometer Siv GPS
Arduino Tsheb kauj vab Speedometer Siv GPS
Arduino Tsheb kauj vab Speedometer Siv GPS

Hauv qhov kev qhia no peb yuav siv Arduino thiab Visuino los tso saib lub tsheb kauj vab tam sim no los ntawm GPS ntawm ST7735 zaub.

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
  1. Arduino UNO (Los yog lwm yam Arduino)
  2. LCD Zaub TFT 7735
  3. GPS Neo M6 V2 module
  4. Jumper xov hlau
  5. Cov qhob cij
  6. Visuino program: Rub tawm Visuino
  7. Roj teeb rau lub zog Arduino (Hauv kuv qhov xwm txheej kuv tsuas yog siv lub txhab nyiaj hluav taws xob)
  8. Qee lub npov kom muab txhua yam tso rau hauv.
  9. Tsheb kauj vab los sim nws

Kauj ruam 2: Circuit Court

Qhov Circuit
Qhov Circuit
Qhov Circuit
Qhov Circuit
Qhov Circuit
Qhov Circuit
Qhov Circuit
Qhov Circuit

LCD TFT ST7735

Txuas:

1.8 TFT Display PIN [LED] rau Arduino PIN [3.3 V]

1.8 TFT Display PIN [SCK] rau Arduino PIN [13]

1.8 TFT Display PIN [SDA] rau Arduino PIN [11]

1.8 TFT Display PIN [A0 lossis DC] rau Arduino PIN [9]

1.8 TFT Display PIN [RESET] rau Arduino PIN [8]

1.8 TFT Display PIN [CS] rau Arduino PIN [10]

1.8 TFT Display PIN [GND] rau Arduino PIN [GND]

1.8 TFT Display PIN [VCC] rau Arduino PIN [5V]

NCO TSEG: Qee lub Arduino cov laug cam muaj sib txawv SPI pins kom ntseeg tau tias koj txheeb xyuas koj cov ntaub ntawv teev tseg.

GPS neo 6m:

CONNECT gps neo 6m PIN [TXD] to Arduino PIN [RX]

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

o pib tsim lub 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 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 "Serial GPS" tivthaiv
  • Ntxiv "TFT Xim Zaub ST7735" 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 "Display1" tivthaiv thiab teeb tsa "Hom" rau "dtST7735R_BlackTab" NCO TSEG: Qee Cov Lus Qhia muaj cov yam ntxwv sib txawv yog li sim los ntawm kev xaiv hom sib txawv los nrhiav qhov uas ua haujlwm tau zoo tshaj plaws, hauv kuv qhov xwm txheej kuv xaiv "dtST7735R_BlackTab"

  • Ob npaug nias rau "Display1" tivthaiv thiab hauv "Elements" dialog drag 2x "Text Field" mus rau sab laug

Xaiv "Text Field1" (ntawm sab laug) thiab hauv qab "Properties" qhov rai teeb tsa:

  • Loj: 3
  • Thawj Tus Nqi: XEEM
  • dav: 6
  • X: 10 hli
  • Y: 10 hli

Xaiv "Text Field2" (ntawm sab laug) thiab hauv qab "Properties" qhov rai teeb tsa:

  • Loj: 5
  • dav: 6
  • Xwm: 5
  • Y: 80 ib

Kauj Ruam 6: Hauv Visuino Connect Components

Hauv Visuino Connect Components
Hauv Visuino Connect Components
  • Txuas "GPS1" tiv thaiv tus pin [Tawm] rau Arduino tus pin Hauv [Serial 0]
  • Txuas "GPS1" tiv thaiv tus pin [Ceev] mus rau "Display1" tivthaiv Text Field2 tus pin [Hauv]
  • Txuas "Display1" tiv thaiv tus pin [Tawm] rau Arduino tus pin SPI [Hauv]
  • Txuas "Display1" tiv thaiv tus pin [Chip Xaiv] rau Arduino Digital tus pin [10]
  • Txuas "Display1" tiv thaiv tus pin [Pib dua] rau Arduino Digital tus pin [8]
  • Txuas "Display1" tiv thaiv tus pin [Sau Npe Xaiv] rau Arduino Digital tus pin [9]

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
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)

Nco tseg: Nco ntsoov thaum koj tab tom tso cov cai rau Arduino rau Disconnect Arduino tus pin [RX]

Kauj ruam 8: Mount thiab Ua Si

Muab Arduino thiab GPS module rau qee lub thawv yas, siv lub roj teeb, teeb nws ntawm lub tsheb kauj vab, xyuas kom tseeb tias GPS antena pom thiab tig mus rau saum ntuj.

Yog tias koj siv zog Arduino UNO module, Cov Zaub yuav pib qhia qhov nrawm ntawm lub tsheb kauj vab tam sim no.

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

Muaj ntau qhov hloov pauv tau rau txoj haujlwm no xws li ntxiv nrug, nrawm nruab nrab, thiab lwm yam Siv koj lub tswv yim thiab kev muaj tswv yim!

Pom zoo: