Cov txheej txheem:
- Kauj Ruam 1: Pib Pib Plotting
- Kauj Ruam 2: Daim phiaj Plooj
- Kauj Ruam 3: Xav paub ntau ntxiv
- Kauj Ruam 4: Xeem Nrog SerialMonitor
- Kauj ruam 5: Txuas nrog Android Txawb
- Kauj ruam 6: Hloov cov ntaub ntawv rau koj lub khoos phis tawj
Video: Yooj Yim Cov Chaw Siv Cov Ntaub Ntawv Hauv Chaw Siv Hauv / Arduino / PfodApp: 6 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Txog Plotting Cov Ntaub Ntawv tawm tsam Hnub/Sijhawm siv tsuas yog Arduino's millis () pom qhov no Qhia Qhia
Cov Lus Qhia no qhia koj yuav ua li cas npaj Arduino sensor cov ntaub ntawv ntawm koj lub xov tooj Android thiab ntes nws tom qab rub tawm rau koj lub computer. Cov lus qhia no tseem muaj nyob ntawm www.pfod.com.au Tsis xav tau Android program thiab yuav tsum tau tsawg heev Arduino programming xav tau. Nws yog qhov txuas ntxiv ntawm Cov Ntaub Ntawv Txawb Xov Tooj Yooj Yim yooj yim siv pfodApp
Kauj Ruam 1: Pib Pib Plotting
a) Tau txais Arduino board thiab Bluetooth Module (xws li Uno thiab Bluetooth Shield lossis FioV3+Bluetooth) b) Nruab Arduino IDE c) Txuas Arduino board (tsis muaj bluetooth module txuas) nrog USB cable. d) Luam daim duab no rau hauv Arduino IDE thiab muab tso ua ke thiab thauj nws mus rau hauv Arduino pawg thawj coj saib) e) Txuas lub Bluetooth Shield module rau Uno (Lub Bluetooth Shield tau teeb tsa ua ntej rau 9600baud Tab sis teeb tsa 3V/5V hloov mus rau 5V thiab teeb tsa mus rau Pawg Thawj Coj/Rau FT232 hloov mus rau Lub Rooj Tsav Xwm txoj haujlwm. f) Thauj koj lub Android Txawb nrog 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. Koj lub xov tooj tam sim no yuav txuag thiab npaj cov Arduino AtoD hloov pauv suav rau cov tswv yim A0
Kauj Ruam 2: Daim phiaj Plooj
Plotting siv pfodApp xav tau ob yam:- a) kwj cov ntaub ntawv (hauv CSV hom ntawv) thiab b) cov lus hais los ntawm pfodDevice (Arduino) Daim duab kos, SimpleDataPlotting.ino, tsuas yog ua ob yam. Ua ntej nws nyeem A0 cov lus sib piv ib pliag thib ob thiab xa tawm cov vib nas this tam sim no thiab suav hauv CSV hom, Thib ob thaum pfodApp txuas thiab thov cov ntawv qhia zaub mov tseem ceeb, kos duab teb nrog cov phiaj xwm hais kom pib ua cov phiaj xwm ntsuas. Nov yog cov cai uas tau ua tiav ib zaug ib zaug los nyeem A0 analog input thiab sau cov vib nas this tam sim no, suav tawm mus rau kev sib txuas bluetooth. // nyeem A0 ib zaug ib zaug int val = analogRead (0); // A0 // tso tawm lub sijhawm tam sim no thiab nyeem hauv csv hom ntawv parser.print (thisMillis/1000); // thawj daim teb yog sijhawm secs parser.print (","); // comma cais cov teb parser.println (val); // kab tshiab xaus cov ntaub ntawv kaw tseg
Nov yog tus lej uas teb rau pfodApp thov rau pfodDevice's (Arduino Uno's) cov ntawv qhia zaub mov tseem ceeb.
byte cmd = parser.parse (); yog (cmd! = 0) {// tau txheeb xyuas qhov ua tiav msg {rau} yog ('.' == cmd) {// pfodApp tau thov rau cov ntawv qhia zaub mov tseem ceeb // xa rov qab "qhib cov phiaj xwm phiaj xwm" parser.print (F ("{= Analog A0 Plot | Sijhawm (sec) | Suav}")); // qhov no yog cov ntawv qhia zaub mov tseem ceeb} yog tias ('!' == cmd) {// Kaw qhov txuas txuas txuas txuas txuas (parser.getPfodAppStream ()); } lwm tus {// tsis paub hais kom ua parser.print (F ("{}")); // ib txwm xa rov qab pfod msg txwv tsis pub pfodApp yuav txiav tawm. }}
Thaum koj lub xov tooj ntawm tes pfodApp txuas nws cia li nug cov ntawv qhia zaub mov tseem ceeb (los ntawm kev xa ntawv {.} Lus), tus neeg cais tawm hauv daim duab (saib cov cai hauv qab ntawm daim duab kos) cais tawm {.} Thiab xa rov qab '.' hais kom ua Cov duab kos tom qab ntawd xa rov qab cov phiaj xwm hais kom ua {= Analog A0 Plot | Sijhawm (sec) | A0 Suav} Cov lus txib ntawd qhia pfodApp kom qhib lub vijtsam hu ua "Analog A0 Plot" thiab npaj lub sijhawm tawm tsam suav. PfodApp tom qab ntawv tshuaj xyuas cov ntaub ntawv nyoos uas tau los thiab saib rau kab nrog ob daim teb thiab siv thawj daim teb ua tus nqi x thiab qhov thib ob yog tus nqi y thiab ntxiv cov ntsiab lus ntawd mus rau hauv daim phiaj. Thaum twg los xij cov phiaj xwm phiaj xwm (lossis cov ntaub ntawv raw cov ntaub ntawv) tau qhib, pfodApp pib khaws tag nrho cov ntaub ntawv nyoos rau hauv cov ntaub ntawv hauv zos ntawm koj lub xov tooj. PfodApp tseem khaws cov ntaub ntawv kom txog thaum koj tawm ntawm pfodApp. Koj tuaj yeem rub tawm cov ntawv no rau koj lub khoos phis tawj rau kev ua haujlwm ntxiv (saib ib qho ntawm cov kauj ruam tom qab). Muaj tus lej ntawm lwm txoj hauv kev xaiv rau kab lus hais kom tso cai rau koj tsis quav ntsej qee qhov chaw, teeb tsa cov nplai nplai, npaj ntau thaj av ntawm ib daim duab thiab lwm yam. Saib pfodSpecification kom paub meej thiab piv txwv. PfodApp tuaj yeem ua ntau yam ntxiv tom qab tsuas yog ua cov phiaj xwm, saib cov piv txwv no. Cov phiaj xwm saum toj no yog piv txwv ntawm ob kab kos ib qho uas muaj ob lub ntsiab lus ntawm nws. Cov phiaj xwm no yog los ntawm ArduMower Ua nws koj tus kheej lub tshuab txiav nyom! uas siv tib pfodApp los tswj lub tshuab txiav nyom. Tib lub pfodApp yog siv los tswj txhua lub pfodDevices. Nws yog pfodDevices uas txiav txim siab tag nrho cov ntxaij vab tshaus tau tshwm rau cov neeg siv.
Kauj Ruam 3: Xav paub ntau ntxiv
Qhov hloov tshiab kawg ntawm pfodApp muaj los ntawm Android Market ua rau cov ntaub ntawv nyoos xa los ntawm pfodDevice (piv txwv li Arduino) kom tau npaj tseg thiab 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. Kev npaj phiaj xwm xav tau ob yam:- a) kwj cov ntaub ntawv (hauv CSV hom ntawv) thiab b) cov lus hais los ntawm pfodDevice Koj li pfodDevice (Arduino) tuaj yeem xa txhua hom ntaub ntawv sab nraum pfod lus. pfod cov lus uas tau muab los ntawm {} uas txawv lawv los ntawm lwm cov ntaub ntawv. Yog tias koj xav npaj cov ntaub ntawv koj yuav tsum xa cov ntaub ntawv hauv CSV hom ntawv. Ntawd yog cov ntaub ntawv tus nqi sib cais los ntawm tus lej, thiab txiav tawm los ntawm kab ntawv tshiab (tog twg los CR lossis LF lossis CR LF) Piv txwv li 105, 680 Thaum pfodDevice xav ua kom pom cov phiaj xwm rau tus neeg siv, pfodDevice xa cov lus hais kom ua. Koj daim duab Arduino tau ua tiav kev tswj hwm ntawm pfodApp cov phiaj xwm. Cov phiaj xwm hais kom muab lub npe rau lub vijtsam phiaj xwm thiab qhia meej tias cov kwj ntawm cov ntaub ntawv nyoos rau cov phiaj thiab cov teb los ntawm cov kwj deg ntawd. Cov kwj sib txawv ntawm cov ntaub ntawv nyoos muaj cov lej sib txawv ntawm cov cim cais cais. Tus lej tuav | hauv kab lus hais kom ua yuav tsum phim tus lej ntawm cov teb hauv cov ntaub ntawv kwj uas koj xav tau phiaj xwm. Cov kab ntawv cov ntaub ntawv nrog tus lej sib txawv ntawm cov teb yog tsis quav ntsej rau cov phiaj xwm no. Muaj ntau txoj hauv kev xaiv rau kev hais kom ua phiaj xwm xaiv thaj tsam rau phiaj thiab teeb tsa nplai thiab chav nyob thiab muab ntau lub ntsiab lus ntawm ib daim duab. Qhov yooj yim tshaj plaws yog xa x qhov tseem ceeb raws li thawj daim teb thiab y qhov tseem ceeb raws li cov haujlwm hauv qab no, tom qab ntawd hauv kab lus hais kom ua lub npe x-axis thiab y-axis piv txwv. {= Analog A0 Plot | Sijhawm (sec) | A0 Suav} cov phiaj xwm npe | x qhov tseem ceeb teb | y qhov tseem ceeb Koj tseem tuaj yeem saib cov ntaub ntawv nyoos raug xa mus rau koj lub xov tooj. "Cov ntaub ntawv nyoos" 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} piv txwv li ib qho kev txiav tawm ntawm cov phiaj xwm hais kom ua. 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 ntaub ntawv tau tshwm sim txhua lub sijhawm tshuaj ntsuam (lossis cov phiaj xwm phiaj xwm) qhib. Txhawm rau tiv thaiv koj lub xov tooj ntawm tes sau nrog cov ntaub ntawv 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 lossis phiaj xwm phiaj xwm 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. Cov ntaub ntawv no tseem muaj rau cov phiaj xwm. 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 rub tawm thiab rho tawm cov ntawv los ntawm koj lub computer. Saib pfodAppForAndroidGettingStarted.pdf kom nkag tau cov ntaub ntawv los ntawm koj lub computer.
Kauj Ruam 4: Xeem Nrog SerialMonitor
Ua ntej txuas ntawm bluetooth, koj tuaj yeem sim tawm qhov kos duab siv Arduino IDE SerialMonitor. Ua ntej tshem tawm 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 (SimpleDataPlotting.ino) tso rau hauv Arduino IDE thiab program Arduino board. Tom qab ntawd qhib Arduino IDE SerialMonitor Koj tuaj yeem pom cov ntaub ntawv raug xa los ntawm Uno board. Tom qab ntawv ntaus ntawv. Cov duab kos teb nrog Plotting hais kom ua. {= Analog A0 Plot | Sijhawm (sec) | A0 Suav} uas yuav nug pfodApp kom qhib lub phiaj xwm tshuaj ntsuam thiab pib npaj cov ntaub ntawv. Qhov no kuj pib khaws cov ntaub ntawv rau hauv ib daim 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 5: Txuas nrog Android Txawb
Txhua yam yog qhov zoo yog li tam sim no koj tuaj yeem kaw Arduino IDE thiab SerialMonitor thiab txuas daim thaiv npog Bluetooth, raws li pom yav dhau los. Txhawm rau txuas nrog koj Android Txawb, xub nruab pfodApp los ntawm Android Kev Lag Luam tom qab ntawd ua raws pfodAppForAndroidGettingStarted.pdf phau ntawv qhia ua ke koj daim thaiv npog Bluetooth nrog koj lub xov tooj thiab teeb tsa Bluetooth pfodApp txuas. Kuv hu kuv qhov kev sib txuas "Cov Ntaub Ntawv Yooj Yim Yooj Yim". Tom qab ntawv xaiv qhov "Kev Siv Cov Ntaub Ntawv Yooj Yim" txuas rau txuas mus rau cov ntaub ntawv yooj yim logger. Sai li pfodApp txuas nws xa {.} Cov lus uas cov duab kos teb nrog {= Analog A0 Plot | Sijhawm (sec) | A0 Suav} cov lus uas qhia rau pfodApp phiaj cov ntaub ntawv thiab tseem pib khaws cov ntaub ntawv. Hauv cov phiaj xwm no kuv tau txuas A0 rau Gnd thiab 5.5V thiab 3.3V thiab tseem tshuav nws ntab tsuas yog khaws suab nrov.
Kauj ruam 6: Hloov cov ntaub ntawv rau koj lub khoos phis tawj
PfodAppForAndroidGettingStarted.pdf qhia ntxaws ntxaws txuas koj lub xov tooj mus rau koj lub khoos phis tawj ntawm USB thiab yuav ua li cas 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 saum toj no, Cov Ntaub Ntawv Yooj Yim Logger tau khaws cov ntaub ntawv rau /pfodAppRawData /Cov Ntaub Ntawv Yooj Yim Logging.txt pfodApp siv lub npe ntawm kev sib txuas ua lub npe cov ntaub ntawv rau txuag cov ntaub ntawv. uas ob qho tib si phiaj xwm thiab khaws koj cov ntaub ntawv, koj tuaj yeem hloov kho daim duab kom xa rov qab koj tus kheej cov ntaub ntawv. Tsuas yog sau koj cov ntaub ntawv, hauv CSV hom ntawv, rau tib Serial txuas uas txuas nrog koj li Bluetooth module. Yog tias koj muaj ntau dua ob qho ntaub ntawv koj yuav tsum tau hloov kho cov phiaj xwm hais kom ua. Saib pfodSpecification kom paub meej thiab piv txwv.
Pom zoo:
D.I.Y YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM LOS NTAWM SCRAPS: 4 Cov Kauj Ruam (nrog Duab)
D.I.Y YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM LOS NTAWM SCRAPS: Hnub no kuv xav qhia yuav ua li cas kom pom lub teeb pom kev zoo los ntawm lub zog xa hluav taws xob tsis siv hluav taws xob los ntawm tus txhuam txhuam hniav thiab lub tshuab solenoid valve coils uas tau khaws los ntawm scrapyard.Ua ntej pib, thov saib cov vis dis aus hauv qab no:
Txoj Kev Yooj Yim thiab Yooj Yim Los Hloov Koj Lub Xauv Screen hauv 6 Cov Kauj Ruam Yooj Yim (Windows 8-10): 7 Kauj Ruam
Txoj Kev Yooj Yim thiab Yooj Yim Los Hloov Koj Lub Xauv Screen hauv 6 Cov Kauj Ruam Yooj Yim (Windows 8-10): Xav hloov pauv yam ntawm koj lub laptop lossis PC? Xav tau kev hloov pauv hauv koj qhov chaw? Ua raws cov kauj ruam no yooj yim thiab yooj yim kom ua tiav koj tus kheej lub computer ntsuas phoo
DIY MusiLED, Music Synchronized LEDs Nrog Ib-nias Windows & Linux Application (32-ntsis & 64-ntsis). Yooj Yim Rov Ua Dua, Siv Yooj Yim, Yooj Yim rau Chaw Nres Nkoj: 3 Kauj Ruam
DIY MusiLED, Music Synchronized LEDs Nrog Ib-nias Windows & Linux Application (32-ntsis & 64-ntsis). Yooj Yim Rov Ua Dua, Siv Yooj Yim, Yooj Yim rau Chaw Nres Nkoj: Qhov haujlwm no yuav pab koj txuas 18 LEDs (6 Liab + 6 Xiav + 6 Daj) rau koj lub Rooj Tswjhwm Saib Arduino thiab txheeb xyuas koj lub khoos phis tawj Lub Suab Suab Lub suab lub sijhawm tiag tiag thiab xa lawv mus rau cov LEDs kom pom lawv raws li qhov cuam tshuam (Snare, High Hat, Kick)
YUAV UA LI CAS YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM TSHAJ PLAWS YOOJ YIM: 4 Cov Kauj Ruam
YUAV UA LI CAS YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM TSHAJ PLAWS: Nyob zoo txhua tus hauv cov lus qhia no kuv yuav qhia koj yuav ua li cas kom yooj yim " SOIL DRYNESS SENSOR ". Qhuav ntawm cov av tau txheeb xyuas siv qhov taw qhia coj. Lub teeb ci wi
Ib qho yooj yim heev/yooj yim/Tsis yooj yim txoj hauv kev kom tib neeg/tib neeg/tsiaj/neeg hlau zoo li lawv muaj txias tiag tiag/Lub zeem muag tshav kub kub (Xim ntawm Koj Xaiv) Siv GIMP: 4 Cov Kauj Ruam
Ib qho yooj yim heev/yooj yim/Tsis yooj yim txoj hauv kev kom tib neeg/tib neeg/tsiaj/neeg hlau zoo li lawv muaj txias tiag tiag/Lub zeem muag tshav kub kub (Xim ntawm Koj Xaiv) Siv GIMP: Nyeem … lub npe