Cov txheej txheem:

Txheeb Xyuas Qhov xwm txheej xwm txheej ceev - Qualcomm Dragonboard 410c: 7 Kauj Ruam
Txheeb Xyuas Qhov xwm txheej xwm txheej ceev - Qualcomm Dragonboard 410c: 7 Kauj Ruam

Video: Txheeb Xyuas Qhov xwm txheej xwm txheej ceev - Qualcomm Dragonboard 410c: 7 Kauj Ruam

Video: Txheeb Xyuas Qhov xwm txheej xwm txheej ceev - Qualcomm Dragonboard 410c: 7 Kauj Ruam
Video: 24.11.2018: XOVXWM NYABLAJ thiab SUAV Kub Heev Nyob Hauv Hiav Txwv SOUTH CHINA SEA 2024, Hlis ntuj nqeg
Anonim
Txheeb Xyuas Qhov xwm txheej xwm txheej ceev - Qualcomm Dragonboard 410c
Txheeb Xyuas Qhov xwm txheej xwm txheej ceev - Qualcomm Dragonboard 410c
Txheeb Xyuas Qhov xwm txheej xwm txheej ceev - Qualcomm Dragonboard 410c
Txheeb Xyuas Qhov xwm txheej xwm txheej ceev - Qualcomm Dragonboard 410c
Txheeb Xyuas Qhov xwm txheej xwm txheej ceev - Qualcomm Dragonboard 410c
Txheeb Xyuas Qhov xwm txheej xwm txheej ceev - Qualcomm Dragonboard 410c

Nrhiav kev ruaj ntseg uas ua haujlwm los saib xyuas xwm txheej xwm txheej ceev, nws tuaj yeem pom tias nyuaj heev rau txheej txheem txhua cov ntaub ntawv kaw tseg. Xav txog qhov ntawd, peb txiav txim siab siv peb qhov kev paub hauv kev ua suab/duab, ntsuas thiab ntsuas kom tsim ib qho kev ua tiav uas ua rau muaj peev xwm kwv yees xwm txheej uas tib neeg lub neej muaj kev phom sij.

Txoj haujlwm no haver lub ntsuas cua hauv cheeb tsam thiab cov cuab yeej siv deb los sau cov ntaub ntawv thiab xa mus rau zaj duab xis, uas muaj lub zog ua haujlwm muaj peev xwm rho tawm cov ntaub ntawv tseem ceeb los ntawm cov ntaub ntawv tau txais.

Cov cuab yeej nyob deb yog Arduino pawg thawj coj nrog tus qauv HC-06 tig tau ua kom hloov pauv tag nrho cov ntaub ntawv xov xwm, thiab tus nqi qis dav dav muaj peev xwm ua cov ntaub ntawv zoo.

Kauj Ruam 1: Cov Cheeb Tsam Xav Tau

Ua ntej tshaj plaws, koj yuav tsum txiav txim siab qhov twg yog qhov ntsuas thiab qhov ua haujlwm uas koj yuav siv, thiab ua cov duab kos duab.

Hauv peb qhov xwm txheej, peb tab tom siv cov ntsuas ntsuas no sib txuas hauv ARDUINO Pro Mini, teev hauv qab no:

  • PIR (Passive Infrared-Lub xub ntiag sensor)
  • DHT 11 (Vaum thiab ntsuas kub)
  • CO Sensor (Carbon Monoxide Sensor)
  • Lub suab nrov nrov

Actuators:

  • lub cev muaj zog servo
  • buzzer

Kev sib txuas lus:

Bluetooth Module HC-06

Txog rau Dragonboard 410c, peb yuav muaj qee lub ntsuas pa thiab software ua haujlwm tag nrho cov ntaub ntawv nkag mus:

Sensors:

  • DHT 11
  • Tshav ntuj Sensor

Actuators:

  • Siv Relay
  • Coj xwm txheej
  • Buzzer

Kauj Ruam 2: Ua Cov Chaw Taws Teeb

Ua Cov Khoom Siv Hluav Taws Xob
Ua Cov Khoom Siv Hluav Taws Xob

Tam sim no nws yog lub sijhawm los txuas txhua yam hauv qab no mus rau Arduino Board, tsim cov cuab yeej uas yuav tau txais cov ntaub ntawv los ntawm ib puag ncig (suab nrov, av noo, kub, thiab lwm yam), thiab xa mus rau Dragonboard los ntawm bluetooth module HC-06.

Nws yog qhov tsim nyog yuav tsum tau them sai sai rau qhov kev sib tham, vim tias txhua lub ntsuas hluav taws xob muaj qhov tshwj xeeb qhov chaw los sib txuas.

Ntawm lub kaw lus, nws muaj peev xwm muaj ntau dua ib lub cuab yeej los khaws cov ntaub ntawv. Ntau lub cuab yeej koj tau teeb tsa hauv ib puag ncig, qhov tseeb dua qhov kev kuaj mob tsim los ntawm kev ua cov ntaub ntawv yog. Txij li nws yuav muaj peev xwm rho tawm cov ntaub ntawv dav uas yuav muaj txiaj ntsig.

Peb txiav txim siab los siv pawg tswj hwm arduino vim tias muaj ntau lub ntsuas hluav taws xob sib xws, thiab nws muaj peev xwm los teeb tsa cov cuab yeej nyob deb hauv qhov chaw sib txawv, sau ntau cov ntaub ntawv.

Cov cuab yeej hauv zos yog DragonBoard 410c, uas yog txheej txheem suab, yees duab, digital thiab analog qhia nrog koj lub zog SnapDragon 410 processor.

Kev tso cov khoom siv (Cov Chaw Siv Hluav Taws Xob)

Ib qho twg muaj qee tus pin uas yuav tsum tau txuas rau hauv txoj cai pin ntawm arduino pro mini board.

Bluetooth module HC-06 muaj 4 tus pin:

  • TX (Transmissor) -> txuas ntawm RX Arduino tus pin
  • RX (Txais) -> txuas ntawm TX Arduino tus pin
  • VCC -> txuas nrog ntawm 5v
  • GND

DHT 11 Sensor muaj 4 pins (tab sis tsuas yog 3 siv):

  • Teeb liab -> txuas ntawm tus lej digital
  • VCC -> txuas nrog ntawm 5v
  • GND

PIR Sensor muaj 3 tus pin:

  • Teeb liab -> txuas nrog ntawm tus lej digital
  • VCC -> txuas nrog ntawm 5v
  • GND

Roj sensor (MQ) muaj 4 tus pin:

  • Digital OUT -> txuas nrog tus lej digital (yog tias koj xav tau cov ntaub ntawv digital)
  • Analog OUT -> hauv peb kis, peb siv qhov txuas nrog ntawm tus pin analog
  • VCC -> txuas nrog ntawm 5v
  • GND

Lub suab nrov nrov (KY-038) muaj 3 tus pin:

  • Teeb liab -> txuas nrog ntawm tus pin analog
  • VCC -> txuas nrog ntawm 5v
  • GND

Txoj Cai rau Arduino Cov Chaw Taws Teeb:

/ * * Arduino xa cov ntaub ntawv los ntawm Blutooth * * Tus nqi ntawm cov ntsuas tau nyeem, sib txuas ntawm * Txoj hlua thiab xa los ntawm chaw nres nkoj txuas. */ #include "DHT.h" #define DHTPIN 3 #define DHTTYPE DHT22 #define PIRPIN 9 #define COPIN A6 DHT dht (DHTPIN, DHTTYPE); ntab humidaty, kub; boolean pir = 0; koj co, mic; Txoj hlua msg = ""; char npe [40]; teeb tsa tsis muaj dab tsi () {Serial.begin (9600); dht.begin (); } void loop () {humidaty = dht.readHumidity (); kub = dht.readTemperature (); pir = digitalRead (PIRPIN); co = analogRead (COPIN); mic = analogRead (A0); msg = "#;" + Txoj hlua (humidaty) + ";" + Txoj hlua (ntsuas kub)+ ";"+ Txoj hlua (mic)+ ";"+ Txoj hlua (pir)+ ";" + String (co) + ";#" + "\ n"; Serial.print (msg); ncua (2000); }

Kev piav qhia txoj cai:

Txhua tus pins siv hauv Arduino tau hais los ntawm qhov pib ntawm txoj cai thiab cov tsev qiv ntawv tshwj xeeb uas xav tau rau kev ua haujlwm ntawm cov ntsuas tau pib. Txhua cov ntaub ntawv yuav raug xa mus rau qhov sib txawv uas yuav tau txais qhov txiaj ntsig nyeem los ntawm txhua lub ntsuas hluav taws xob txhua 2000 milliseconds, tom qab ntawd txhua tus ntawm lawv tau sib sau ua ke hauv txoj hlua, tom qab ntawd nws tau sau ua ntu zus. Los ntawm qhov ntawd nws yooj yim heev ntawm tus lej pyton tam sim no hauv DragonBoard txhawm rau ntes cov ntaub ntawv no.

Kauj Ruam 3: Cov software thiab cov tsev qiv ntawv

Txhawm rau ua txhua cov ntaub ntawv tau txais thiab tswj hwm kev nyab xeeb, yog qhov tsim nyog siv qee lub software thiab cov tsev qiv ntawv hauv Qualcomm DragonBoard 410c.

Hauv qhov haujlwm tshwj xeeb no peb siv:

Cov software:

  • Nab hab sej
  • Arduino

Cov qauv:

  • Amazon AWS -> online server
  • Phant -> Tus tswv cov ntaub ntawv pabcuam

Tsev qiv ntawv:

  • OpenCV-Kev Ua Yeeb Yaj Kiab (https://opencv-python-tutroals.readthedocs.io/en/latest/)
  • PyAudio - Ua Lub Suab (https://people.csail.mit.edu/hubert/pyaudio/)
  • Wave (https://www.physionet.org/physiotools/wave-installation.shtm)
  • AudioOp (https://docs.python.org9https://scikit-learn.org/stable/install.html/2/library/audioop.html)
  • Noob (https://www.numpy.org)
  • SciKit1 - Qhia thiab twv lub tshuab kev kawm (https://scikit-learn.org/stable/install.html)
  • cPickle - Txuag lub tshuab kev kawm tsis (https://pymotw.com/2/pickle/)
  • MRAA - Siv GPIOs (https://iotdk.intel.com/docs/master/mraa/python/)
  • UPM-Siv GPIOs (https://github.com/intel-iot-devkit/upm)
  • PySerial - Siv rau kev sib txuas lus txuas nrog Bluetooth ntaus ntawv (https://pythonhosted.org/pyserial/)

Kauj Ruam 4: Siv SSH thiab Txhim Kho Libs

Ua ntej tshaj plaws koj yuav tsum tau txais tus IP chaw nyob los ntawm Dragonboard, txhawm rau ua li ntawd, koj yuav tsum qhib DragonBoard txuas nrog nas, keyboard thiab HDMI saib. Thaum pawg thawj coj qhib koj yuav tsum txuas rau lub network, dua li koj mus rau lub davhlau ya nyob twg thiab khiav cov lus txib:

sudo ifconfig

tom qab ntawd koj tuaj yeem tau txais tus IP chaw nyob.

Nrog tus IP chaw nyob koj tuaj yeem nkag mus rau Dragonboard ntawm SHH, txhawm rau ua qhov ntawd koj xav tau qhib lub davhlau ya nyob twg hauv lub khoos phis tawj txuas nrog tib lub network zoo li lub rooj tsavxwm. Hauv lub davhlau ya nyob twg koj tuaj yeem khiav cov lus txib:

ssh linaro@{IP}

(koj yuav tsum hloov {IP} nrog IP chaw nyob uas koj tau txais hauv Dragonboard).

Thawj lib koj xav tau rau nruab yog mraa lib. Txhawm rau ua qhov ntawd koj yuav tsum tau khiav cov lus txib hauv qab no hauv lub davhlau ya nyob twg:

sudo ntxiv-apt-repository ppa: mraa/mraa && sudo apt-ge; t hloov tshiab && sudo apt-tau nruab libmraa1 libmraa-dev mraa-tools python-mraa python3-mraa

Txhawm rau nruab opencv rau nab hab sej koj tsuas yog yuav tsum ua kom tiav cov lus txib:

sudo apt-tau nruab python-opencv

Txhawm rau nruab PyAudio koj yuav tsum tau khiav cov lus txib:

sudo apt-tau nruab python-pyaudio python3-pyaudio

Libs WAVE thiab AudioOp twb tau teeb tsa hauv pawg thawj coj. Txhawm rau nruab numpy koj yuav tsum tau khiav cov lus txib:

sudo apt-tau nruab python-numpy nab hab sej-scipy

Qhov kawg lib uas koj yuav tsum tau teeb tsa yog lub scikit, txhawm rau nruab nws koj yuav tsum muaj lub pip nruab. Tshaj li koj tsuas yog xav tau kom ua cov lus txib:

pip nruab scikit-lear

Kauj ruam 5: Bluetooth raws tu qauv

Bluetooth raws tu qauv
Bluetooth raws tu qauv
Bluetooth raws tu qauv
Bluetooth raws tu qauv
Bluetooth raws tu qauv
Bluetooth raws tu qauv

DragonBoard Kev Sib Txuas nrog Arduino los ntawm Bluetooth

Bluetooth module (HC-06) tau pib txuas nrog Arduino Nano raws li qhov piv txwv hauv qab no:

Siv Linaro (Cov Txheej Txheem Ua Haujlwm Siv hauv txoj haujlwm tam sim no hauv DragonBoard) cov duab sib tham, nyob rau sab xis ntawm kab hauv qab nyem rau ntawm lub cim Bluetooth thiab tom qab ntawv nyem rau "Teeb Tshiab Ntaus" thiab teeb tsa nrog koj lub Bluetooth module tawm nws ua khub. Txheeb xyuas tias koj tus qauv tau txuas nrog tiag tiag los ntawm txhaj rau lub cim Bluetooth dua, nyem rau "Devices …" thiab saib yog tias lub npe ntawm koj lub cuab yeej tau teev tseg thiab txuas nrog. Tam sim no xaiv koj lub cuab yeej hauv "Bluetooth Devices" screen thiab nyem rau nws thiab nco qhov chaw nres nkoj uas koj lub Bluetooth module txuas nrog (piv txwv li: "rfcomm0"). Nco tseg: Lub npe chaw nres nkoj uas koj lub cuab yeej txuas nrog yuav yog qhov tseem ceeb rau cov kauj ruam tom ntej kom pab tau cov ntaub ntawv sib pauv.

Tsim kom DragonBoard Cov Ntaub Ntawv Sib Hloov thiab Bluetooth

Yeej peb ua raws cov kauj ruam ib kauj ruam ntawm qhov txuas: https://www.uugear.com/portfolio/bluetooth-communi… tab sis peb tsis tau ua ib feem ntawm kev ua khub tsuas yog ua tiav ntawm cov nab npawb nab npawb thiab Arduino. Hauv nab hab sej tau siv lub tsev qiv ntawv xov xwm uas tau pib ua ntej hauv qhov chaw nres nkoj txuas nrog bluetooth, yog li cov nab npawb nab nyeem cov ntaub ntawv ntawm cov ntsuas uas txuas nrog rau arduino los ntawm bluetooth module.

Kauj Ruam 6: Siv Mezzanine ntawm DragonBoard 410c

Siv Mezzanine ntawm DragonBoard 410c
Siv Mezzanine ntawm DragonBoard 410c

Txhawm rau ua kom muaj kev sib txuas nruab nrab ntawm cov ntawv xov xwm thiab cov sib txuam, peb tab tom siv ib hom ntaub thaiv npog hu ua Mezannine, tsim los ntawm 96boards.

Siv daim ntaub thaiv no, txuas cov khoom siv sab nrauv yooj yim dua.

Cov khoom sib txuas siv yog los ntawm cov ntoo cov khoom siv txhim kho, yog li nws tsuas yog siv cov xov tooj especif uas txuas ob txoj hauv kev, Txhua ntu tuaj yeem nrhiav tau yooj yim hauv lub vev xaib no:

Peb siv cov khoom siv hauv qab no:

  • Grove Relay
  • Grove Tshav ntuj sensor
  • Grove coj qhov (socket)
  • Grove temp & humi sensor
  • Grove Buzzer

Kauj Ruam 7: DragonBoard 410c Software

Ib feem ntawm qhov kev zov me nyuam hauv DragonBoard tau teev nyob hauv Python thiab txoj haujlwm tau siv ntawm Arduino tau tsim hauv C ++. Txhua txhua 2 feeb Arduino nyeem tag nrho lub sensor txuas rau nws. Tshaj li Arduino xa nyeem rau DragonBoard los ntawm Bluetooth. DragonBoard suav nrog kev nyeem ntawv los ntawm Arduino nrog kev nyeem ntawv uas nws ua los ntawm Mezzanine daim ntaub thaiv nrog cov yam ntxwv los ntawm lub suab thiab cov vis dis aus.

Nrog cov ntaub ntawv no, Pawg Thawj Coj sim twv seb nws puas muaj xwm txheej xwm txheej ceev. Pawg Thawj Coj xa mus rau Amazon Web Service siv Phant cov ntaub ntawv nyoos thiab kev twv ua ntej uas nws tau ua. Yog tias pawg thawj coj kwv yees tias nws tau tshwm sim qhov xwm txheej txawv nws sim ceeb toom rau tus neeg siv ntsais muag coj thiab buzzer hauv Mezzanine thiab qhia ntawm daim ntawv thov web. Hauv daim ntawv thov web nws tseem tuaj yeem pom cov ntaub ntawv nyoos kom nkag siab tias muaj dab tsi tshwm sim hauv cheeb tsam no.

Pom zoo: