Cov txheej txheem:

Yooj Yim Txheeb Cov Ntaub Ntawv Txawb Siv PfodApp, Android thiab Arduino: 5 Kauj Ruam
Yooj Yim Txheeb Cov Ntaub Ntawv Txawb Siv PfodApp, Android thiab Arduino: 5 Kauj Ruam

Video: Yooj Yim Txheeb Cov Ntaub Ntawv Txawb Siv PfodApp, Android thiab Arduino: 5 Kauj Ruam

Video: Yooj Yim Txheeb Cov Ntaub Ntawv Txawb Siv PfodApp, Android thiab Arduino: 5 Kauj Ruam
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Hlis ntuj nqeg
Anonim
Yooj Yim Txawb Cov Ntaub Ntawv Nkag Mus Siv PfodApp, Android thiab Arduino
Yooj Yim Txawb Cov Ntaub Ntawv Nkag Mus Siv PfodApp, Android thiab Arduino
Yooj Yim Txawb Cov Ntaub Ntawv Nkag Mus Siv PfodApp, Android thiab Arduino
Yooj Yim Txawb Cov Ntaub Ntawv Nkag Mus Siv PfodApp, Android thiab Arduino
Yooj Yim Txawb Cov Ntaub Ntawv Nkag Mus Siv PfodApp, Android thiab Arduino
Yooj Yim Txawb Cov Ntaub Ntawv Nkag Mus Siv PfodApp, Android thiab Arduino

Moblie Data Logging ua Yooj Yim siv pfodApp, koj li Andriod mobile thiab Arduino. Tsis muaj Android Programming xav tau. Rau Plotting Cov Ntaub Ntawv ntawm koj Android pom qhov no tom qab Instuctable Simple Remote Data Plotting siv Android / Arduino / pfodApp

Txog Plotting Cov Ntaub Ntawv tawm tsam Hnub/Sijhawm siv tsuas yog Arduino's millis () pom qhov no Qhia Qhia

Taw qhia Cov lus qhia no qhia koj yuav ua li cas thiaj ntes Arduino cov ntaub ntawv ntsuas ntawm koj lub xov tooj Android rau tom qab rub tawm rau koj lub khoos phis tawj. Tsis xav tau Android cov phiaj xwm thiab xav tau me ntsis Arduino cov phiaj xwm xav tau. Saib www.pfod.com.au rau cov phiaj xwm yooj yim dua Pib sai a) Tau txais Arduino board thiab Bluetooth Module (xws li Uno thiab Bluetooth Shield lossis FioV3+Bluetooth/Wifi) b) Nruab Arduino IDE c) Txuas Arduino board (tsis muaj bluetooth module txuas) nrog USB cable. (rau Uno) d) Luam daim duab no mus rau hauv Arduino IDE thiab muab tso ua ke thiab thauj nws mus rau hauv Arduino board) e) Txuas lub Bluetooth Shield module rau Uno (Bluetooth Shield tau teeb tsa ua ntej rau 9600baud TAB tab teeb tsa 3V/5V hloov mus rau 5V thiab teeb tsa To Board/To FT232 hloov mus rau To Board txoj haujlwm. f) Load your Android Mobile with pfodApp. g) Teeb tsa kev sib txuas ntawm koj lub xov tooj thiab Bluetooth module raws li tau piav qhia hauv pfodAppForAndroidGettingStarted.pdf h) Pib pfodApp thiab txuas rau koj li Arduino board ntawm Bluetooth module. i) Tiav lawm. Qee cov ntaub ntawv piv txwv dummy tau nthuav tawm ntawm koj lub xov tooj thiab khaws rau hauv daim npav SD. (raws li qhia) pfodAppForAndroidGettingStarted.pdf piav qhia yuav hloov cov ntaub ntawv li cas ntawm koj lub xov tooj mus rau koj lub computer. Tus so ntawm cov lus qhia no mus rau hauv cov ntsiab lus thiab qhia koj yuav hloov kho daim duab kom xa koj li ntaub ntawv li cas. PfodApp tuaj yeem ua ntau yam ntxiv, saib cov piv txwv no ntawm www.pfod.com.au

Kauj Ruam 1: Tom Qab - Cov Ntaub Ntawv Yooj Yim Yooj Yim

Tom qab - Cov Ntaub Ntawv Yooj Yim Yooj Yim
Tom qab - Cov Ntaub Ntawv Yooj Yim Yooj Yim
Tom qab - Cov Ntaub Ntawv Yooj Yim Yooj Yim
Tom qab - Cov Ntaub Ntawv Yooj Yim Yooj Yim

Qhov hloov tshiab kawg ntawm pfodApp muaj los ntawm Android Market ua rau cov ntaub ntawv nyoos xa los ntawm pfodDevice kom raug khaws cia rau hauv cov ntaub ntawv rau siv tom qab. Saib pfodAppForAndroidGettingStarted.pdf txhawm rau rub tawm cov ntawv los ntawm koj lub xov tooj ntawm tes rau hauv koj lub computer. PfodApp muaj lub vijtsam 'cov ntaub ntawv nyoos' uas tau nthuav tawm txhua cov ntaub ntawv tau txais uas tsis yog pfod cov lus xa los ntawm {}. Lub vijtsam no tuaj yeem nkag los ntawm pfodApp siv koj lub xov tooj ntawm tes lossis nws tuaj yeem qhib los ntawm pfodDevice xa cov lus streamingRawData, {= Title Ntawm Qhov Screen Mus Ntawm No}} (Saib Arduino kos duab tom qab hauv cov lus qhia no). Ib txoj hauv kev twg pfodApp cov ntaub ntawv nyoos tau qhib thiab yuav tso tawm cov ntaub ntawv uas tau xa los ntawm pfodDevice. Thaum lub vijtsam qhib, pfodApp yuav pib khaws cov ntaub ntawv rau hauv ib daim ntawv. Lub npe ntawm cov ntawv tau tshwm sim txhua lub sijhawm qhib lub vijtsam. Txhawm rau tiv thaiv koj lub xov tooj ntawm tes sau nrog cov ntaub ntawv uas koj tsis xav tau, pfodApp tsis pib sau cov ntaub ntawv mus rau lub xov tooj SD daim npav kom txog thaum thawj zaug Raw Data screen tau qhib tom qab txhua qhov txuas tshiab. Thawj thawj zaug Raw Data screen tau qhib tom qab kev sib txuas tshiab, txog 4K bytes ntawm cov ntaub ntawv tau txais yav dhau los (txij li kev sib txuas tau ua) tau sau rau hauv cov ntawv thaum nws qhib. Feem ntau qhov no txhais tau tias tag nrho cov ntaub ntawv nyoos xa txij li kev sib txuas tau ua yuav raug cawm. Thaum qhov kev sib txuas raug kaw, qhov kawg ntawm cov ntaub ntawv tau sau thiab cov ntaub ntawv raug kaw. Yog tias cov ntaub ntawv twb muaj, los ntawm kev sib txuas yav dhau los, nws tau txuas ntxiv los ntawm txhua qhov txuas tom ntej. Koj tuaj yeem rho tawm cov ntawv hauv koj lub computer. Saib pfodAppForAndroidGettingStarted.pdf kom nkag tau cov ntaub ntawv los ntawm koj lub computer. Yog li hauv cov lus luv los khaws cov ntaub ntawv los ntawm koj Arduino rau koj lub xov tooj ntawm Android koj yuav tsum txuas rau koj Arduino (raws li pfodDevice) siv pfodApp, los ntawm bluetooth lossis wifi, kom koj Arduino xa cov ntaub ntawv thiab qhib cov ntaub ntawv nyoos los pib khaws nws. Yog tag nrho. Tus so ntawm cov lus qhia no yuav piav qhia qhov yooj yim kos duab uas siv lub pfodDevice thiab xa qee cov ntaub ntawv (dag).

Kauj ruam 2: Yooj Yim Cov Ntaub Ntawv Logger

Yooj Yim Cov Ntaub Ntawv Logger
Yooj Yim Cov Ntaub Ntawv Logger

Daim duab no (rub tawm) yog Cov Ntaub Ntawv Logger yooj yim. Nws tsis ua ntau yam, thaum pfodApp txuas thiab nug txog cov ntawv qhia zaub mov tseem ceeb, daim duab kos tsuas yog xa rov qab cov ntaub ntawv nyoos cov lus nug uas nug pfodApp kom qhib cov ntaub ntawv nyoos. Qhov no pib txuag cov ntaub ntawv. Hauv qhov no cov ntaub ntawv raug xa ib zaug ib pliag thiab tsuas yog suav nrog tus lej ntawm cov vib nas this txij li Arduino tau txhawb zog. Rau koj cov ntaub ntawv tiag logger koj yuav xa qee cov ntaub ntawv tiag tiag. Kev sib txuas ntawm no yog ntawm bluetooth siv qhov pheej yig ITEAD BT SHIELD (SLAVE) ntawm Uno Arduino board (Txhua tus pom nplooj ntawv no rau FioV3 cov laug cam + bluetooth lossis Wifi modules) Koj yuav tsum teeb tsa lub teeb ntawm ITEAD Bluetooth board. Teeb lub 3V/5V hloov mus rau 5V thiab teeb tsa Lub Rooj Sib Tham/Rau FT232 hloov mus rau Lub Rooj Tsav Xwm txoj haujlwm. Lub neej ntawd bluetooth module board tus nqi yog 9600, yog li tsis tas yuav ua lwm yam teeb tsa. Koj tseem yuav xav tau USB cable thiab rub tawm thiab teeb tsa Arduino IDE. Thaum kawg yuav tsum tau pfod parser. Txog qhov kos duab no qhov yooj yim tshaj plaws tuaj yeem siv cais thiab nws yog qhov me me Kuv tsuas yog suav nrog nws nyob hauv qab ntawm daim duab. Txawm li cas los koj tseem tuaj yeem rub tawm thiab teeb tsa nws, thiab lwm yam pfod parsers, ua lub tsev qiv ntawv los ntawm no. Nov yog ib feem ntawm qhov kos duab uas xa cov ntaub ntawv. Nws suav tus timer thiab thaum lub sijhawm mus txog 0 nws xa cov ntaub ntawv tom ntej uas tsuas yog lub txee hauv qhov piv txwv no.

// tam sim no xa cov ntaub ntawv yog 1sec tau dhau yog ((thisMillis - dataSampleTimer)> SAMPLE_INTERVAL) {dataSampleTimer += SAMPLE_INTERVAL; // hloov tshiab rau lub sijhawm tom ntej txee ++; // nce tus qauv // xa nws parser.println (txee); }

Txhawm rau xa koj tus kheej cov ntaub ntawv tsuas yog hloov theparser.println (txee); luam koj cov ntaub ntawv mus rau Serial kev sib txuas hloov chaw. (Saib nplooj ntawv no ntawm Arduino timers).

Kauj Ruam 3: Xeem Nrog SerialMonitor

Kev Xeem Nrog SerialMonitor
Kev Xeem Nrog SerialMonitor
Kev Xeem Nrog SerialMonitor
Kev Xeem Nrog SerialMonitor

Ua ntej txuas ntawm bluetooth, koj tuaj yeem sim tawm qhov kos duab siv Arduino IDE SerialMonitor. Ua ntej tshem lub rooj sib tham bluetooth, vim nws siv tib TX/RX sib txuas ua USB kev teeb tsa thiab saib xyuas txuas, thiab theej thiab muab cov duab kos tso rau hauv Arduino IDE thiab teeb tsa Arduino board. Tom qab ntawd qhib Arduino IDE SerialMonitor Koj tuaj yeem pom cov ntaub ntawv raug xa los ntawm Uno board. Tom qab ntawd xa qhov getMainMenu hais kom ua, {.} Nov yog qhov pfodApp yuav xa ua ntej thaum nws txuas. Cov duab kos teb nrog StreamingRawData cov lus tshuaj ntsuam. {= Piv txwv Cov Ntaub Ntawv Teev Cov Ntaub Ntawv} uas yuav nug pfodApp kom qhib RawData screen. Qhov ntawd pib txuag cov ntaub ntawv rau hauv cov ntawv. Saib pfodSpecification kom paub meej ntawm txhua cov lus thiab cov ntxaij vab tshaus uas pfod (Cov Txheej Txheem rau Kev Tshawb Fawb Kev Tshawb Fawb) txhawb nqa.

Kauj ruam 4: Txuas nrog Android Txawb

Txuas nrog Android Txawb
Txuas nrog Android Txawb
Txuas nrog Android Txawb
Txuas nrog Android Txawb

Txhua yam zoo yog li tam sim no koj tuaj yeem kaw Arduino IDE thiab SerialMonitor thiab txuas daim thaiv npog Bluetooth, raws li qhia hauv Kauj Ruam 2. Txhawm rau txuas nrog koj li Android Txawb, xub nruab pfodApp los ntawm Android Market tom qab ntawd ua raws li pfodAppForAndroidGettingStarted.pdf phau ntawv qhia ua khub koj daim npog Bluetooth nrog koj lub xov tooj ntawm tes thiab teeb tsa Bluetooth pfodApp txuas. Kuv hu kuv qhov txuas "Data Logger". Tom qab ntawv xaiv qhov "Cov Ntaub Ntawv Logger" txuas mus txuas rau cov ntaub ntawv yooj yim logger. Sai li sai tau pfodApp txuas nws xa {.} Cov lus uas cov duab kos teb nrog {= Piv Txwv Cov Ntaub Ntawv Teev Cov Ntaub Ntawv} cov lus uas qhia rau pfodApp kom qhib cov ntaub ntawv raw cov ntaub ntawv thiab npe nws yooj yim Cov Ntaub Ntawv Nkag Mus thiab tseem pib khaws cov ntaub ntawv.

Kauj ruam 5: Hloov cov ntaub ntawv rau koj lub khoos phis tawj thiab txuas ntxiv mus rau Cov Ntaub Ntawv Yooj Yim Logger

Hloov cov ntaub ntawv rau koj lub khoos phis tawj thiab txuas ntxiv mus rau Cov Ntaub Ntawv Yooj Yim Logger
Hloov cov ntaub ntawv rau koj lub khoos phis tawj thiab txuas ntxiv mus rau Cov Ntaub Ntawv Yooj Yim Logger

PfodAppForAndroidGettingStarted.pdf qhia ntxaws yuav ua li cas txuas koj lub xov tooj ntawm tes rau koj lub khoos phis tawj ntawm USB thiab tig lub USB ntim cia kom koj tuaj yeem tshawb nws los ntawm koj lub computer. Koj yuav pom txhua cov ntaub ntawv nyoos hauv pfodAppRawData nplaub tshev. Raws li tau hais los saud, Cov Ntaub Ntawv Yooj Yim Yooj Yim tau khaws cov ntaub ntawv rau /pfodAppRawData /Cov Ntaub Ntawv Logger.txt pfodApp siv lub npe kev sib txuas ua lub npe cov ntaub ntawv kom txuag tau cov ntaub ntawv. tuaj yeem hloov kho daim duab kom xa rov qab koj tus kheej cov ntaub ntawv. Tsuas yog sau koj cov ntaub ntawv rau tib Serial txuas uas txuas nrog koj li Bluetooth module. Nws muaj txiaj ntsig los teeb tsa cov ntaub ntawv rau hauv csv hom ntawv hauv Arduino ua ntej xa nws. Piv txwv li lub sijhawm, tus nqi Qhov no ua kom yooj yim rau thauj mus rau hauv daim ntawv nthuav qhia rau kev ua tom ntej/cov phiaj xwm.

Pom zoo: