Cov txheej txheem:

Teeb rau Sab Nraud Bluetooth GPS Tus Zov Me Nyuam rau Android Devices: 8 Kauj Ruam
Teeb rau Sab Nraud Bluetooth GPS Tus Zov Me Nyuam rau Android Devices: 8 Kauj Ruam

Video: Teeb rau Sab Nraud Bluetooth GPS Tus Zov Me Nyuam rau Android Devices: 8 Kauj Ruam

Video: Teeb rau Sab Nraud Bluetooth GPS Tus Zov Me Nyuam rau Android Devices: 8 Kauj Ruam
Video: Мужская Casio G-Shock Magma Ocean Золотой Rangeman | 35-летие GPRB1000TF-1 Обз... 2024, Hlis ntuj nqeg
Anonim
Teeb rau Sab Nraud Bluetooth GPS Tus Zov Me Nyuam rau Android Devices
Teeb rau Sab Nraud Bluetooth GPS Tus Zov Me Nyuam rau Android Devices

Cov lus qhia no yuav piav qhia yuav ua li cas tsim koj tus kheej sab nraud Bluetooth-qhib GPS rau koj lub xov tooj, zes dab tsi ntawm tsuas yog kwv yees li $ 10.

Cov nqi ntaub ntawv:

  1. NEO 6M U-blox GPS
  2. HC-05 bluetooth module
  3. Kev paub txog kev cuam tshuam Blutooth Cov qauv siv hluav taws xob tsawg
  4. Arduino
  5. Kev nkag siab zoo
  6. Kev Paub Teeb

Kauj Ruam 1: Cov hauv paus ntsiab lus

Yog li qhov no ua haujlwm li cas, feem ntau?

  1. u-blox yog lub tuam txhab Swedish uas tsim GPS. GPS module muab ntau cov ntaub ntawv raws li lawv hu ua NEMA raws tu qauv. Nws yuav suav nrog ntau kab ntawm cov ntaub ntawv hauv nws daim ntawv RAW, tab sis siv cov software raug cai koj yuav tsum muaj peev xwm qhia tau tias yog dab tsi.
  2. GPS module tso tawm cov ntaub ntawv hauv cov ntawv xov xwm thiab cov ntaub ntawv tau txais los ntawm bluetooth module, txij li lawv tau ua haujlwm ntawm UART. (txhais tau tias lawv muaj tib hom kev thauj mus los yog tias koj tuaj yeem xav txog nws li ntawd).
  3. Tam sim no, tus qauv bluetooth nrog txoj kev teeb tsa raug, yuav xa tag nrho cov ntaub ntawv GPS nyoos rau koj lub xov tooj siv hauv.
  4. Lub xov tooj Android yuav siv daim ntawv thov thib peb los ua cov ntaub ntawv GPS RAW rau hauv daim ntawv uas tib neeg nyeem tau.
  5. Lub app yuav "hack" rau hauv koj lub xov tooj lub system kom "hloov" GPS "tsev qiv ntawv" nrog Bluetooth GPS cov ntaub ntawv koj nyuam qhuav xa thiab tau txais. Nov yog qhov uas feem ntau hu ua "qhov chaw thuam". *
  6. Ib qho kev qhia-app piv txwv li Google Maps yuav tsum ua haujlwm sib luag nrog Bluetooth GPS.

*Kev tsis lees paub: Kuv tsis muaj feem cuam tshuam nrog ib tus neeg tsim khoom kho vajtse thiab software hais hauv cov lus qhia no. Koj nkag siab tias rub tawm ib qho software twg muaj kev pheej hmoo ntawm kev ua txhaum cai cybersecurity. Vajtswv paub dab tsi cov software tsim tawm sau hauv cov apps no, hwm lawv txhua txoj hauv kev koj tuaj yeem ua tau. Kuv tsis yog lub luag haujlwm rau kev puas tsuaj rau koj lub xov tooj lossis rau koj, thiab koj muaj lub luag haujlwm tag nrho rau kev hloov kho. Ua ntawm koj tus kheej txoj kev pheej hmoo.

Kauj ruam 2: Sau koj cov ntaub ntawv

Sau Koj Cov Khoom
Sau Koj Cov Khoom
Sau Koj Cov Khoom
Sau Koj Cov Khoom

Koj yuav tsum muaj NEO-6M GPS, Arduino, thiab HC-05 bluetooth module, txawm tias kuv xav tias koj yuav tuaj yeem siv HC-06 hauv qee qhov kev nkag siab. Koj kuj tseem xav tau koj lub khoos phis tawj, qee qhov kev paub siv computer thiab khoom siv hluav taws xob.

Kauj Ruam 3: Txuas Koj Lub Bluetooth Module rau Koj Arduino

Cov kauj ruam no tseem ceeb heev kom paub tseeb tias koj UART ntawm koj Arduino khiav ntawm 9600 Baud.

Txuas koj lub bluetooth module rau koj Arduino.

Qhib koj Arduino IDE ntawm koj lub computer thiab txuas koj Arduino rau koj lub computer.

Tua tawm koj lub bluetooth module rau hauv AT hom los teeb tsa nws cov chaw. (cov ntaub ntawv thaum yuav khoom). Txwv tsis pub, sim khiav nws hauv 38400 baud.

Thaum kawg, siv lub

AT+ORGL

rov pib dua rau koj qhov chaw qub. CEEB TOOM: Qhov no yuav rov ua dua ib qho ntawm cov qauv teeb tsa ua ntej.

ces, teeb UART rau 9600 Baud

AT+UART = 9600, 0, 0

Koj yuav tsum muaj peev xwm pom lub

OK

lus kom paub meej tias koj qhov chaw.

Zoo.

Cov uas tsis paub tias kuv tab tom tham txog dab tsi, tso cai rau kuv qhia koj txog ob peb feeb mus rau ob peb teev ntawm kev tshuaj xyuas ntawm cov lus qhia los teeb tsa koj lub bluetooth module. Yog tias koj xav tau kuv kev pab, tuav kuv lub xub pwg los ntawm kev tawm koj cov lus hauv qab no.

Kauj Ruam 4: Txuas Koj GPS Module rau Koj Lub Computer

Cov kauj ruam no yog qhov tseem ceeb los tshuaj xyuas yog tias koj lub GPS ua haujlwm, thiab tseem txhawb kom koj tus kheej txav mus rau hauv cov lus qhia no.

NEO-6M yuav tsum muaj 4 tus pin. Txuas raws li:

NEO6M VCC rau 5V Arduino

RX to TXC

TXX to RX

GND to CSY

Rau cov uas tsis paub qhov twg heck yog TX thiab RX ntawm koj Arduino, tsuas yog muab lawv rau 11 thiab 10 feem. Kev lig kev cai, koj yuav tsum tso rau 0 thiab 1 tab sis 4 xyoos ntawm kev paub tau los ntawm kuv lub paj hlwb uas lawv tsis ua haujlwm txhua lub sijhawm vim tias lawv 3.3V tso zis teeb liab.

Okay.

Tam sim no, qhib qhov piv txwv piv txwv uas koj tuaj yeem pom hauv koj cov ntawv piv txwv, lossis ua nws txoj hauv kev yooj yim:

#suav nrog

SoftwareSerial mySerial (10, 11); // RX, TX

void teeb tsa () {

// Qhib kev sib txuas lus txuas thiab tos rau qhov chaw nres nkoj qhib: Serial.begin (9600); thaum (! Serial) {; // tos rau qhov chaw nres nkoj txuas mus txuas. Xav tau rau ib txwm USB chaw nres nkoj nkaus xwb}

mySerial.begin (9600);

}

void loop () {// khiav dhau thiab dhau mus

yog (mySerial.available ()) {Serial.write (mySerial.read ()); } yog (Serial.available ()) {mySerial.write (Serial.read ()); }}

Qhov kuv tab tom ua ntawm no yog qhov kuv tab tom qhia rau Arduino tias "Hav, GPS tab tom yuav pov tseg qee cov ntaub ntawv rau koj, ntawm no yog qee cov lus qhia yuav ua li cas thiaj tau txais lawv. Tsis tas li, lawv tau muab nws pov tseg ntawm tus nqi 9600 Baud."

Ok. Upload cov cai.

Kauj Ruam 5: Txheeb Xyuas Koj Li GPS

Txheeb xyuas koj li xwm txheej GPS
Txheeb xyuas koj li xwm txheej GPS

Tam sim no, cov kauj ruam no yog qhov uas koj txheeb xyuas GPS xwm txheej.

Nws yog ib qho tseem ceeb heev kom kaw txhua Arduino IDE qhov rai, txhua-ib-ib-ntawm-lawv. Tsis muaj kev zam. Unplugging koj Arduino yog qhov tsis tsim nyog.

Mus rau u-blox lub vev xaib txhawm rau nrhiav u-center. Nov yog software uas hloov pauv NEMA raws tu qauv RAW cov ntaub ntawv mus rau hauv GUI daim ntawv zoo uas koj tuaj yeem xav tias koj yog tus saib xyuas txias rau ib pliag, tab sis qhov tseeb koj tsuas yog saib ntawm tus lej thiab tus lej.

Thaum koj tau rub tawm u-center thiab teeb nws, thiab tseem qhib nws, koj yuav tsum muaj peev xwm pom qee cov duab ci. Txwv tsis pub, cia kuv qhia koj qee qhov chaw los ua si ib ncig.

Ntawm cov ntawv qhia zaub mov bar, mus rau Cov Cuab Yeej> Chaw Nres Nkoj, xyuas kom tseeb tias koj lub chaw nruab nrab txuas nrog koj Arduino los ntawm kev ua pov thawj ib qho "COM 1" lossis tus lej ua tau. Tsis tas li, txheeb xyuas yog tias Koj Cov Cuab Yeej> baud tus nqi yog 9600, lossis koj tuaj yeem teeb nws rau Cov Cuab Yeej> autobauding kom yooj yim.

Koj yuav tsum tau txais qee yam ntawm qhov no.

Kauj Ruam 6: Txuas Koj GPS rau Koj Tus Qauv Bluetooth

Ntawm no koj txuas koj lub GPS rau koj lub bluetooth module.

Siv kev paub hluav taws xob yooj yim, txuas:

NEO6M TX> RX Bluetooth

RX> TX

Nws yog qhov zoo rau lub zog ob qho tib si ntawm 5V.

Ob qho qauv yuav tsum ntsais muag qee lub teeb ntawm qhov no. Kos.

Kauj Ruam 7: Txuas Koj Lub Bluetooth rau Koj Lub Hauv Ntaus Ntawv

Txuas koj Bluetooth rau Koj Lub Android Ntaus Ntawv
Txuas koj Bluetooth rau Koj Lub Android Ntaus Ntawv

Cov kauj ruam no yuav qhia koj yuav ua li cas cuam tshuam koj lub bluetooth GPS nrog rau lwm tus app.

Muaj qee qhov apps uas tuaj yeem ua haujlwm nrog kho vajtse. Cia kuv qhia Bluetooth GPS.

Rub tawm lub app rau koj lub cuab yeej thiab khiav nws.

Txij ntawm no mus, mus rau Chaw Koj nyob hauv koj lub cuab yeej siv Android los ua ke koj tus qauv bluetooth, Rov qab mus rau Bluetooth GPS app thiab nias txuas ntawm lub kaum sab xis saum toj. Qhov no yuav pib qhov kev sib txuas ntawm bluetooth module thiab koj lub Android ntaus ntawv. Cov ntaub ntawv yuav tsum los rau hauv.

Ib qho teeb meem daws teeb meem kuv tuaj yeem qhia yog los so sab laug ntawm lub app kom pom View log kom pom tias muaj cov ntaub ntawv nkag los. Gibberish cov ntaub ntawv yuav tsum qhia tias koj lub bluetooth txuas tau zoo tab sis koj tus nqi baud yuav yog qhov teeb meem ntawm no.

Kauj Ruam 8: Xaus thiab Pom Zoo

Tam sim no koj tau ua haujlwm bluetooth module, koj yuav tsum muab koj tus kheej ib puag ncig ntawm kev npuaj teg.

Pom zoo: