Cov txheej txheem:

Pike - Tsav Kev Nyab Xeeb, Tsav Ntse, Tsav Tus Pike!: 5 Kauj Ruam
Pike - Tsav Kev Nyab Xeeb, Tsav Ntse, Tsav Tus Pike!: 5 Kauj Ruam

Video: Pike - Tsav Kev Nyab Xeeb, Tsav Ntse, Tsav Tus Pike!: 5 Kauj Ruam

Video: Pike - Tsav Kev Nyab Xeeb, Tsav Ntse, Tsav Tus Pike!: 5 Kauj Ruam
Video: HMONG TEBCHAWS 😱 XWM TXHEEJ 2024, Hlis ntuj nqeg
Anonim
Pike - Tsav Kev Nyab Xeeb, Tsav Zoo dua, Tsav Pike!
Pike - Tsav Kev Nyab Xeeb, Tsav Zoo dua, Tsav Pike!

Txais tos rau kuv qhov project hu ua Pike!

Nov yog ib qhov haujlwm uas yog ib feem ntawm kuv txoj kev kawm. Kuv yog tub ntxhais kawm NMCT ntawm Howest hauv Belgium. Lub hom phiaj yog ua kom qee yam ntse los ntawm kev siv Raspberry Pi. Peb muaj kev ywj pheej tag uas peb xav ua ntse.

Rau kuv nws yog qhov yooj yim xaiv kom ua rau kuv lub tsheb kauj vab ntse dua. Kuv nyob hauv qhov chaw uas caij tsheb kauj vab tau txais kuv sai dua rau kuv lub hom phiaj hauv nroog.

Kuv kuj poob nrog kuv lub tsheb kauj vab ib zaug. Kuv tsoo kuv lub taub hau. Kuv poob vim kuv tau taw tes rau tus tsav tsheb tom qab kuv tias kuv xav mus kom raug. Txoj kev yog nplua thiab kuv poob kev tswj vim kuv tsuas muaj ib txhais tes ntawm kuv lub kauj. Tias yog vim li cas kuv thawj lub tswv yim yog txhawm rau qhia cov taw qhia rau kuv lub tsheb kauj vab. Los ntawm qhov ntawd kuv pib xav dab tsi ntxiv Kuv tuaj yeem ntxiv yog li kuv tuaj nrog GPS-taug qab yog li koj tuaj yeem pom tom qab uas koj tau taug txoj kev twg.

Yog li Pike tuaj yeem ua dab tsi?

Pike yuav khaws cov ntaub ntawv hais txog koj kev tsav tsheb. Nws yuav taug qab txoj kev uas koj tau taug, nws suav koj qhov nrawm nruab nrab thiab qhov nrug koj tau tsav. Tom qab txhua ntu koj tuaj yeem nkag mus rau hauv lub vev xaib txhawm rau txheeb xyuas qhov twg thiab koj caij li cas. Peb tseem yuav tsim qee yam kom koj tuaj yeem xaiv leej twg yuav caij tsheb kauj vab kom coob leej neeg tuaj yeem siv koj lub Pike yog tias lawv xav tau!

Kauj Ruam 1: Qhov Chaw

Qhov Chaw
Qhov Chaw

Yog li pom tseeb koj yuav tsum paub dab tsi koj xav tau los tsim kuv qhov haujlwm. Ua ntej peb pib kuv xav hais tias txoj haujlwm no tsis pheej yig kiag li. Tsis tas li kuv yuav cov xov hluav taws xob hauv khw hauv ib cheeb tsam uas tau them ntau dua. Koj tuaj yeem yuav lawv online rau ob peb euros/daus las (uas kuv xav kom koj ua). Kuv tsis muaj sijhawm tos. Tias yog vim li cas kuv thiaj yuav lawv los ntawm kuv lub khw khw hauv zos ntawm tus nqi siab.

Daim ntawv yuav khoom

- Raspberry Pi

- Jumper Cables

- Powerbank ib qho twg yuav ua tau tsuav nws muab koj lub zog txaus Pi

- Maxxter Smartphone Holder (feem ntau yog qhov pheej yig tshaj uas koj tuaj yeem pom …)

- Maxxter Smartphone Holder (cov ncig dawb tseem pheej yig heev kom haum kuv lub raj yas)

- Cov yas yas (drilled qhov nyob rau hauv nws kom haum cov nyees khawm uas haum rau hauv lub xov tooj smartphone tuav rau txuas rau ntawm lub kauj)

- Nyees khawm*

6 x 220 Ω resistors

- 1x 5K Ω resistor

- LCD Zaub

- DS18B20 Ib Qhov Kub Kub Sensor

- Adafruit GPS-module qhov kawg tawg 66 Channel

- GPS Antenna - Antenna Active Sab Nraud - 3-5V 28db nrog 5 meter cable SMA (txhawm rau ua kom lub teeb liab GPS)

- uFLto SMA Adapter (txuas txuas tus kav hlau txais xov ntxiv rau Adafruit GPS-module)

Sau ntawv:

* Cov uas koj yuav pom hauv cov duab yog hlau, tej zaum tsis yog qhov zoo tshaj plaws tab sis cov ntawd yog cov uas lawv muaj ntawm kuv lub khw khw. Koj tuaj yeem mus rau cov khawm tsis muaj dej tab sis cov ntawd yog 15 € ib qho uas kuv xav tias yog txoj hauv kev kom kim rau khawm. Koj tuaj yeem yuav lub khawm twg los xij koj xav tau tsuav nws ua haujlwm nrog rub tawm qhov system koj yuav zoo.

Kauj Ruam 2: Txhim Kho Txhua Yam

Hlau Txhua Yam
Hlau Txhua Yam
Hlau Txhua Yam
Hlau Txhua Yam

Nws tsis nyuaj li. Txij li GPS module txuas nrog USB. Koj tuaj yeem pom hauv daim duab saum toj no uas koj tuaj yeem phim cov xim nrog cov xov txuas ntawm USB adapter. Cov nyees khawm thiab LEDS txuas nrog 220 Ω. DS18B20 Kub ntsuas kub tau txuas mus rau 5K Ω resistor.

Kauj Ruam 3: Cia Configure Koj Raspberry Pi

Cia Configure Koj Raspberry Pi!
Cia Configure Koj Raspberry Pi!

Ua ntej koj yuav xav tau Raspbian uas koj tuaj yeem kawm ntawm no thiab tom qab ntawd koj yuav tsum ua raws cov theem hauv cov chaw cia khoom no.

Kuv Lub Sijhawm Database raug txiav tawm tsawg heev. Nws muaj 4 lub rooj:

  1. tbluser

    1. UserID (me meintint, 2) YOOJ YIM YUAV TSUM PAUB, YUAV TSUM PAUB
    2. Tus neeg siv lub npe (varchar, 175)
    3. UserLogin (txawv, 180)
    4. UserPassword (hloov, 255)
    5. UserActive (me meintint, 1) TSIS MUAJ
  2. tblsession

    1. SessionID (int, 10) AUTO INCREMENT, TSIS MUAJ
    2. SessionDate (hnub tim)
    3. Tus ID
  3. tblsensor

    1. SensorID (cov ntawv me me, 3) YOOJ YIM YUAV TSUM PAUB, TSIS MUAJ
    2. SensorName (txawv, 150)
  4. keeb kwm

    1. Keeb Kwm ID (bigint, 20) YUAV TSUM PAUB TXOG, TSIS MUAJ
    2. SensorID
    3. SessionID
    4. Keeb kwmValue (varchar, 255)
    5. Lub Sijhawm Keeb Kwm (sijhawm, 3)

Tab sis koj tseem tuaj yeem saib ntawm.sql cov ntaub ntawv pov tseg

Kauj Ruam 4: Cia Pib Pib Coding

Cia Peb Pib Coding
Cia Peb Pib Coding

Koj tuaj yeem nrhiav kuv tus lej txhawm rau txhawm rau ua txoj haujlwm no ntawm no.

GPS

Nws yooj yim heev kom pib nrog GPS Module. Txhua yam koj yuav tsum tau ua yog teeb tsa gpsd-py3 pob hauv koj li Python ib puag ncig. Tom qab ntawd koj tuaj yeem siv lub tsev qiv ntawv no los ua koj lub neej yooj yim dua. Koj tuaj yeem siv cov qauv piv txwv kom tau txais cov ntaub ntawv xws li ntev, ntev, latitude, nrawm, thiab lwm yam los ntawm koj li GPS.

LCD-Zaub

Txhawm rau ua LCD Zaub ua haujlwm koj yuav tsum teeb tsa lub tsev qiv ntawv los ntawm Adafruit. Coding piv txwv tuaj yeem pom ntawm no.

DS18B20 Ib Tus Hlau Kub Kub Sensor

Txhawm rau nrhiav koj ib lub xov tooj cua sensor koj yuav tsum ua haujlwm me ntsis ntxiv. Ua ntej tshaj plaws peb yuav tsum tau qhib ib lub npav npav. Txhawm rau ua qhov no ua raws cov theem:

  1. sudo raspi-teeb tsa
  2. Kev xaiv cuam tshuam
  3. 1-Hlau

Txhawm rau pib nyeem cov ntaub ntawv los ntawm lub sensor peb yuav tsum paub li cas peb ib lub xov tooj hu ua. Rau hom no hauv cd/sys/bus/w1/devices/

Koj yuav pom ob lub cuab yeej, ib qho yog Raspberry Pi nws tus kheej thiab lwm qhov yuav tsum zoo ib yam li 28-0 … thiab. Txhawm rau nyeem cov ntaub ntawv hauv nab hab sej koj yuav tsum qhib nws ua cov ntawv. Yog li txoj hauv kev qhib cov ntawv yuav tsum zoo li qhov no:/sys/bus/w1/devices/28-04177032d4ff/w1_slave.

Nyees khawm thiab LEDs

Cov no yog cov haujlwm yooj yim, koj tuaj yeem saib kuv cov cai hauv phau ntawv teev npe no.

SQL-Cov nqe lus

Yuav luag txhua nqe lus yog cov lus SQL yooj yim. Txawm li cas los xij kuv xav muab piav me ntsis ntawm yuav ua li cas kuv khaws kuv lub cim xeeb lawv qhov txiaj ntsig. Kuv tau ntxiv kuv tus kheej rau kuv lub tblsensors. Yog li kuv paub lub sensor twg muaj tus ID. Yog li kuv taug qab Longtitude, Latitude thiab kuv Ceev. Rau txhua tus nqi kuv tau ua haujlwm sib txawv. Kuv tsuas yog yuav ua 3 sql nqe lus uas zoo ib yam tab sis nyob ntawm seb tus nqi twg kuv xav khaws kuv hloov qhov QHIA nqe lus.

Pom zoo: