Cov txheej txheem:

Arduino/Android rau Cov Pib, Tsis Xav Tau Coding - Cov Ntaub Ntawv thiab Kev Tswj: 15 Cov Kauj Ruam
Arduino/Android rau Cov Pib, Tsis Xav Tau Coding - Cov Ntaub Ntawv thiab Kev Tswj: 15 Cov Kauj Ruam

Video: Arduino/Android rau Cov Pib, Tsis Xav Tau Coding - Cov Ntaub Ntawv thiab Kev Tswj: 15 Cov Kauj Ruam

Video: Arduino/Android rau Cov Pib, Tsis Xav Tau Coding - Cov Ntaub Ntawv thiab Kev Tswj: 15 Cov Kauj Ruam
Video: Dab neeg Nkauj nraug cog lus ruaj tuag thiaj tseem nco los tos - Ghost story 2024, Hlis ntuj nqeg
Anonim
Arduino/Android rau Cov Pib, Tsis Xav Tau Coding - Cov Ntaub Ntawv thiab Kev Tswj
Arduino/Android rau Cov Pib, Tsis Xav Tau Coding - Cov Ntaub Ntawv thiab Kev Tswj

Hloov kho 23rd Plaub Hlis 2019 - Rau hnub tim/sijhawm phiaj xwm siv tsuas yog Arduino millis () pom Arduino Hnub/Sijhawm Npaj Ua/Txiav Txim Siv Millis () thiab PfodApp Qhov tseeb pub dawb pfodDesigner V3.0.3610+ tsim ua tiav cov duab kos Arduino los npaj cov ntaub ntawv tawm tsam hnub/sijhawm siv Arduino millis () TSIS YOG Android lossis Arduino CODING YUAV TSUM TAU

==========================================================================

Txoj haujlwm tsim nyog rau kev pib ua tiav. Kiag Tsis tas yuav muaj kev paub coding. Thaum koj ua tiav cov lus qhia no koj yuav tuaj yeem tsim cov ntawv qhia zaub mov twg koj xav tau los teeb tsa, phiaj xwm thiab nkag mus Arduino Cov Ntaub Ntawv, Kev nyeem Analog thiab Digital Inputs, thiab tswj Arduino outputs, PWM outputs thiab Digital Outputs.

Tshwj xeeb hauv cov lus qhia no yuav qhia koj yuav ua li cas, phiaj xwm thiab nkag mus rau Analog nyeem ntawv thiab tso saib lub xeev ntawm Digital input thiab tswj PWM cov zis thiab ua rau lub zog Digital Output. Txhawm rau hloov qee yam ntawm thiab tawm saib Yuav Ua Li Cas Ntxiv Relays rau Arduino thiab Lub Tsev Yooj Yim Automation rau Cov Pib. Kuj tseem muaj ntau pfodDesigner tutorials thiab lwm yam kev qhia Cov Ntaub Ntawv Logging thiab Plotting muaj.

Tsis tas yuav tsum muaj tus lej yuav tsum tau ua rau cov lus qhia no. Tsis xav tau Arduino coding, pfodDesignerV2 pub dawb tsim txhua txoj cai koj xav tau. Tsis xav tau Android coding, lub hom phiaj dav hauv Android pfodApp qhia txog cov ntawv qhia zaub mov thiab cov ntaub ntawv thiab phiaj xwm thiab teev cov ntaub ntawv thiab ua haujlwm cov neeg siv khoom nkag. Txawm li cas los xij cov lus qhia no tsuas yog npog qee cov ntxaij vab tshaus thiab xaiv cov khoom muaj nyob hauv pfodApp. Txheeb xyuas qhov ua tiav pfodSpecification rau txhua qhov ntxaws ntxaws.

Cov lus qhia no tseem nyob online ntawm Yuav Ua Li Cas Zaub / Plot Arduino Cov Ntaub Ntawv ntawm Android siv pfodDesignerV2 / pfodApp - Tsis tas yuav tsum tau sau tus lej

Kauj Ruam 1: Dab Tsi Android/Arduino Kho Vajtse Txhawb

pfodApp khiav ntawm Android mobiles, V2.1 los txog thiab tuaj yeem txuas siv Bluetooth Classic, Bluetooth Tsawg Zog (BLE), Wifi thiab SMS.

Ntawm Arduino sab, pfodDesignerV2 tsim cov cai rau Arduino 101 (BLE), UNO thiab sib xws (MEGA 2650 thiab lwm yam), ESP8266 cov laug cam, RedBear BLE, RFduino, thiab ntau yam Ethernet, Bluetooth, Bluetooth LE, WiFi thiab SMS thaiv.

Kauj Ruam 2: Tsim thiab Xeem Cov Ntaub Ntawv Zaub thiab Cov Ntawv Qhia Tawm Tswv Yim

Yam koj yuav tsum tau ua ua ntej koj pib

Txoj haujlwm no haum rau cov pib ua tiav, tab sis koj xav tau ua tiav ob peb yam haujlwm ua ntej koj pib. Koj yuav tsum xub teeb tsa Arduino IDE, teeb tsa pfodDesignerV2 thiab xyuas kom tseeb tias koj tuaj yeem hloov qhov kos duab zaum kawg (daim ntawv file), uas pfodDesignerV2 tsim tawm, los ntawm koj lub xov tooj mus rau koj lub computer.

  1. Nruab Arduino IDE rau koj lub khoos phis tawj ua haujlwm los ntawm Pib Pib nrog Arduino thiab ua haujlwm los ntawm cov piv txwv ntawm kev suav sau thiab ua haujlwm piv txwv Blink.
  2. Nruab qhov dawb pfodDesignerV2 app ntawm koj lub xov tooj hauv.
  3. Txheeb xyuas tias koj tuaj yeem xa cov ntaub ntawv los ntawm koj lub xov tooj mus rau koj lub computer los ntawm USB cable lossis xa cov ntaub ntawv xa mus xws li WiFi File Transfer. Saib pfodAppForAndroidGettingStarted.pdf kom paub meej ntxiv.

Yam koj yuav tsum tau yuav

PfodDesignerV2 pub dawb yog li koj tuaj yeem ua tau feem ntau ntawm cov lus qhia no nrog tsuas yog pfodDesignerV2 ntawm koj lub xov tooj ntawm tes. Tab sis yog tias koj xav ua tiag tso tawm/phiaj xwm qee cov ntaub ntawv lossis hloov qee yam rau/tawm koj yuav xav tau yuav Arduino pawg thawj coj saib tau thiab pfodApp.

Cov ntawv qhia no yuav siv Arduino 101 / Genuino 101 ua piv txwv pawg thawj coj, nws tau tsim nrog Bluetooth LE kev sib txuas lus. Tab sis koj tuaj yeem siv ntau yam ntawm lwm yam khoom siv kho vajtse. Saib nplooj ntawv no rau lwm daim BLE cov laug cam thiab daim thaiv lossis nplooj ntawv no rau siv ESP2866 cov laug cam lossis nplooj ntawv no rau ESP8266 Wifi daim thaiv, lossis nplooj ntawv no rau siv Uno/Mega nrog daim thaiv txuas nrog ntawm Serial, lossis nplooj ntawv no rau siv daim thaiv SMS. Koj tseem tuaj yeem tsim cov cai rau Arduino Ethernet daim thaiv.

Nco tseg: Tsis yog txhua lub xov tooj ntawm tes txhawb nqa BLE kev sib txuas, yog li tshawb xyuas koj lub xov tooj ntawm tes ua ntej txiav txim siab lub rooj tsav xwm/daim thaiv yuav khoom. Yog tias koj lub xov tooj txhawb nqa BLE koj lub xov tooj ntawm tes xav tau khiav Android V4.4 lossis siab dua kom tau txais txiaj ntsig BLE txuas

Kauj Ruam 3: Tsim Cov Ntawv Qhia - Cov Ntawv Qhia Tshiab thiab Kom sai

Tsim Cov Ntawv Qhia - Cov Ntawv Qhia Tshiab thiab Kom sai
Tsim Cov Ntawv Qhia - Cov Ntawv Qhia Tshiab thiab Kom sai
Tsim Cov Ntawv Qhia - Cov Ntawv Qhia Tshiab thiab Kom sai
Tsim Cov Ntawv Qhia - Cov Ntawv Qhia Tshiab thiab Kom sai
Tsim Cov Ntawv Qhia - Cov Ntawv Qhia Tshiab thiab Kom sai
Tsim Cov Ntawv Qhia - Cov Ntawv Qhia Tshiab thiab Kom sai

Cov lus qhia no yuav npog tsib (5) cov ntawv qhia zaub mov, Cov Ntaub Ntawv Qhia kom pom qhov nyeem Analog tau ntsuas rau lub ntiaj teb tiag, On/Off Display los qhia lub xeev ntawm cov tswv yim digital, PWM Tso tawm kom teeb tsa pwm tawm thiab On/Off Teeb rau teeb tsa lossis ua kom lub zog tso tawm digital thiab Daim duab rau phiaj xwm kev sib piv kev nyeem ntawv ntsuas rau lub ntiaj teb tiag. Txhua yam ntawm cov khoom no muaj cov ntawv tsim, qauv thiab nthuav tawm. Tab sis ua ntej koj yuav tsum qhib pfodDesignerV2 thiab tsim cov ntawv qhia zaub mov tshiab.

Pib Ntawv Qhia Ntawv Tshiab

Rub tawm thiab teeb tsa pfodDesignerV2 los ntawm GooglePlay.

Thaum qhib pfodDesignerV2 koj yuav raug nthuav qhia nrog Start Menu Tshiab khawm. Txhua lub vijtsam tseem muaj khawm Pab.

Teeb tsa Lub Sijhawm Tshiab

Nyem rau Start menu Tshiab khawm qhia cov npe ua haujlwm muaj rau cov ntawv qhia zaub mov tshiab. Cov ntawv qhia zaub mov tshiab tau tsim nrog tsis muaj cov nyees khawm thiab lub npe ua ntej, Menu_1. Peb xav kom pfodApp rov thov dua cov ntawv qhia zaub mov no ib ntus kom tau txais qhov txiaj ntsig tshiab kawg, yog li siv Qhov Hloov Kho Lub Sijhawm Hloov Tshiab kom teeb tsa lub sijhawm ncua sijhawm tshiab rau 1sec.

Saib ua ntej Cov Ntawv Qhia

Nyem Ua Ntej Ntawv Qhia zaub mov kom pom qhov kev tsim qauv tam sim no zoo li cas. Tsis muaj cov nyees khawm tsis tau, tsuas yog qee qhov pib tam sim ntawv hauv qab. Siv lub xov tooj rov qab khawm rov qab mus rau Kho kom raug lub vijtsam txhawm rau kho qhov ua sai sai rau qee yam muaj txiaj ntsig dua.

Hloov Cov Lus Cog Tseg

Nyem rau ntawm Edit Prompt kom qhib qhov Editing Prompt screen. Qhov hais kom sai yog cov ntawv pom rau tus neeg siv hauv qab ntawm cov npe tau nthuav tawm ntawm cov ntawv qhia zaub mov. Hauv qhov Editing Prompt screen, kev saib ua ntej ntawm qhov hais qhia tau pom nyob hauv qab ntawm qhov screen.

Nyem Kho kom raug cov ntawv tam sim thiab teeb cov ntawv rau “Arduino Data”, pfodApp yuav cia li hloov pauv cov ntawv yog tias nws dav dhau rau ntawm lub vijtsam, koj tuaj yeem ua kab ntawv tshiab ntawm 'Arduino' thiab 'Cov Ntaub Ntawv' kom yuam cov ntawv ntawm ob kab.

Nyem rau ntawm lub npov kom lees txais cov kev hloov pauv no thiab rov ua kom pom Lub Khoos Phis Tawj Khoos Phis Tawj nrog cov ntawv hloov tshiab tam sim, nyob hauv qab ntawm qhov screen.

Tom qab ntawv teeb tus ntawv loj rau, xim tom qab rau Navy thiab teeb Bold. (Scroll cia kom nkag mus rau lwm qhov kev xaiv ua qauv). Dawb yog cov xim ntawv pib, koj tuaj yeem hloov nws yog tias koj xav tau.

Cov xim keeb kwm yav dhau teeb tsa rau tam sim kuj teeb tsa lub neej yav dhau los xim rau tag nrho cov ntawv qhia zaub mov.

Kauj Ruam 4: Tsim Cov Ntawv Qhia - Analog Cov Ntaub Ntawv Zaub

Tsim Cov Ntawv Qhia - Analog Cov Ntaub Ntawv Zaub
Tsim Cov Ntawv Qhia - Analog Cov Ntaub Ntawv Zaub
Tsim Cov Ntawv Qhia - Analog Cov Ntaub Ntawv Zaub
Tsim Cov Ntawv Qhia - Analog Cov Ntaub Ntawv Zaub
Tsim Cov Ntawv Qhia - Analog Cov Ntaub Ntawv Zaub
Tsim Cov Ntawv Qhia - Analog Cov Ntaub Ntawv Zaub

Thawj cov ntawv qhia zaub mov uas yuav muab ntxiv yog cov zaub ntawm ib qho txiaj ntsig sib piv rau lub ntiaj teb qhov tseem ceeb thiab nrog cov ntawv piav qhia thiab chav nyob. Rov qab mus rau Editing Menu_1 screen thiab nyem rau ntawm Add Menu Item. Qhov no yuav qhia koj cov npe ntawm cov ntawv qhia zaub mov uas koj tuaj yeem ntxiv. Qhib qis me ntsis los qhia Cov Ntaub Ntawv Qhia Xaiv.

Nyem rau ntawm Cov Ntaub Ntawv Qhia xaiv kom ntxiv nws thiab qhib nws cov tshuaj ntsuam.

Cov Ntaub Ntawv Qhia Tawm tsuas lees txais cov ntaub ntawv tseem ceeb ntawm koj li pfodDevice (koj Arduino). Cov ntaub ntawv tseem ceeb muaj qhov tshwj xeeb ntau yam (default 0 to 1023) uas yog mapped rau tso saib ntau yam (Display Min.. Display Max) hauv koj lub xov tooj ntawm tes thiab nthuav tawm siv Cov Ntawv Qhia Ua, tus nqi mapped thiab Cov Ntawv Tom Qab. Tus nqi khij kuj tseem tshwm ntawm kab rov tav.

Hauv qhov piv txwv no ADC nyeem ntawv yog los ntawm A0 ntawm Arduino 101. Qhov ADC nyeem no suav txij 0 txog 1023 suav, piv txwv li 10 tus hloov pauv me me, thiab siv 3.3V qhov ntsuas hluav taws xob. Ntawd yog 1023 suav sib npaug 3.3V cov tswv yim. Rau Uno boards 1023 suav yog 5 Volts los ntawm lub neej ntawd. Thaum rau ESP8266 cov laug cam 1023 yog 1.0V. Yog li koj teeb tsa Display Max kom pfodApp yuav qhia qhov tseeb rau cov ntaub ntawv tus nqi ntawm 1023.

Hauv qhov piv txwv no Hloov Kho Cov Ntawv rau 'A0' nrog qhov chaw tom qab 0. Kho Kho Kab Lus tom ntej rau 'V' yam tsis muaj chaw nyob. Kho Cov Duab Max rau '3.3' txij li peb tau siv Arduino 101 board los ntsuas Volts nrog 10 tus hloov pauv qhov twg 1023 suav == 3.3V

pfodApp ua kom ntseeg tau tias cov lej ntawm cov lej zauv tso tawm ntau tshaj qhov kev daws teeb meem ntawm cov ntaub ntawv. Scrolling koj yuav pom qhov Hloov Kho Cov Ntaub Ntawv Hloov Pauv Ntau Yam. Lub pob no cia koj teeb tsa qhov kev cia siab / siv tau ntau ntawm cov ntaub ntawv tus nqi thiab siv los ua ntau yam rau daim ntawv qhia rau qhov tshwj xeeb (Zaub Min.. Zaub Max). Lub neej ntawd (0.. 1023) yog qhov xav tau rau ADC nyeem ntawv, tab sis tuaj yeem hloov pauv kom haum rau qhov sib txawv ntawm cov ntaub ntawv sib txawv tau nthuav tawm.

Yog tias koj tau txais cov ntaub ntawv los ntawm 12 tus hloov pauv tom qab ntawd nkag mus Cov Hloov pauv Hloov pauv yuav tsum yog 0 txog 4095, rau 16 ntsis nws yuav yog 0 txog 65535. Piv txwv: Yog tias koj tau txais cov ntaub ntawv los ntawm 12 ntsis ADC, txuas nrog rau 1000 kPa siab transducer, tom qab ntawd nkag mus rau 0 txog 4095 raws li Cov Ntaub Ntawv Hloov Pauv Ntau Yam, 0 raws li Zaub Min, 1000 li Zaub Max thiab 'kPa' raws li Cov Kab Lus tom ntej, yog li 1000kPa yuav tshwm sim thaum Arduino xa cov ntaub ntawv nyeem ntawm 4095.

Ib yam li teeb tsa tus ntawv loj, xim, style thiab keeb kwm yav dhau, kuj tseem muaj qhov kev xaiv tsuas yog tso saib cov ntawv lossis kab ntawv qhia lossis ob qho tib si los ntawm txhaj rau Cov Ntawv Qhia thiab Slider khawm kom toggle ntawm cov kev xaiv no: -Display Text and SliderDisplay Text OnlyDisplay Slider Xwb

Qhov piv txwv no yuav tso tawm ob qho tib si ntawm cov ntawv thiab qhov ntsuas bar (slider). Nco tseg: Tus swb tsis tuaj yeem txav tau. Cov ntawv qhia zaub mov no yog rau tso saib nkaus xwb, tsis yog rau cov neeg siv khoom siv.

Txuas cov zaub no rau Analog Input

Thaum kawg nqes mus rau Kho Cov Ntawv Qhia Khoom Khoom screen rau "Tsis txuas nrog tus I/O tus pin" khawm thiab nyem rau nws kom qhib zaub raws li cov npe ntawm ADC pins.

Rau Uno tshaj cov laug cam thiab Arduino 101 muaj 6 Analog input pins (ADC). Yog tias koj siv ESP8266 lub cuab yeej tsuas muaj ib tus lej ADC, A0.

Xaiv A0. Thaum pfodDesignerV2 tsim cov cai nws yuav suav nrog cov hauv kev hu rau analogRead thiab xa cov nyeem pfodApp ua qhov hloov tshiab cov ntawv qhia zaub mov txhua lub sijhawm pfodApp thov kom rov ua dua tshiab.

Saib ua ntej Cov Ntawv Qhia

Rov qab mus rau Editing Menu_1 screen thiab saib ua ntej cov ntawv qhia zaub mov. Qhov no yog qhov tseeb nws yuav zoo li cas hauv pfodApp, vim tias pfodDesignerV2 yog qhov tseeb tsuas yog pfodApp version nrog qhov tshwj xeeb rov qab kawg los lis cov ntawv qhia zaub mov tsev thiab kho. Txhua lub vijtsam hauv pfodDesignerV2 yog tus qauv pfodApp screen uas koj tuaj yeem tsim thiab tswj los ntawm koj tus pfodDevice (koj Arduino)

Raws li pfodApp rov thov cov ntawv qhia zaub mov no, nws yuav hloov kho cov zaub nrog cov ntaub ntawv tshiab tshaj plaws tau teeb tsa rau thaj tsam 0V txog 3.3V.

Kauj Ruam 5: Tsim Cov Ntawv Qhia - On/Off Cov Ntaub Ntawv Zaub

Tsim Cov Ntawv Qhia - On/Off Cov Ntaub Ntawv Zaub
Tsim Cov Ntawv Qhia - On/Off Cov Ntaub Ntawv Zaub
Tsim Cov Ntawv Qhia - On/Off Cov Ntaub Ntawv Zaub
Tsim Cov Ntawv Qhia - On/Off Cov Ntaub Ntawv Zaub
Tsim Cov Ntawv Qhia - On/Off Cov Ntaub Ntawv Zaub
Tsim Cov Ntawv Qhia - On/Off Cov Ntaub Ntawv Zaub
Tsim Cov Ntawv Qhia - On/Off Cov Ntaub Ntawv Zaub
Tsim Cov Ntawv Qhia - On/Off Cov Ntaub Ntawv Zaub

Cov ntawv qhia zaub mov tom ntej uas yuav tau ntxiv yog On / Off Display uas yuav qhia txog lub xeev tam sim no ntawm 0 /1 qhov sib txawv. Nws qhov kev qhia no peb yuav saib xyuas lub xeev ntawm D4 tus lej nkag tus lej, Siab (1) lossis Tsawg (0).

Nyem Ntxiv Cov Ntawv Qhia Khoom dua thiab xaiv On/Off Display (Nco ntsoov ua tib zoo, qhov no TSIS YOG Qhov On/Off Setting, tab sis On/Off Display txuas ntxiv hauv cov npe xaiv.)

Scroll down thiab nyem rau ntawm "Tsis txuas nrog tus I/O tus pin" khawm thiab xaiv D4 ua tus pin los txuas rau cov zaub no. Hauv peb qhov piv txwv kev nkag mus rau D4 yog qhov hloov pauv qhov rooj uas raug kaw thaum lub qhov rooj raug kaw thiab qhib lwm yam, yog li thaum lub qhov rooj nkag siab Lub qhov rooj qhib thiab thaum lub qhov rooj nkag qis Lub qhov rooj raug kaw.

Kho cov kab ntawv coj mus rau "Qhov rooj yog". Nco tseg qhov chaw tom qab 'yog' thiab Kho Cov Ntawv Tsawg rau "Kaw" thiab Kho Cov Ntawv Zoo rau "Qhib". Koj kuj tseem tuaj yeem hloov cov ntawv ntawv me me, xim thiab lwm yam raws li koj xav tau.

Kuj nyem rau ntawm Cov Ntawv Qhia thiab Slider kom txog rau thaum nws hais tias Zaub Text Only

Qhov ntawd yog txhua yam uas xav tau los ua kom pom cov tswv yim digital. Rov qab mus thiab saib ua ntej cov ntawv qhia zaub mov.

Kauj Ruam 6: Tsim Cov Ntawv Qhia - PWM Tso Tawm

Tsim Cov Ntawv Qhia - PWM Tso Tawm
Tsim Cov Ntawv Qhia - PWM Tso Tawm
Tsim Cov Ntawv Qhia - PWM Tso Tawm
Tsim Cov Ntawv Qhia - PWM Tso Tawm

PfodDesignerV2 kuj ua rau nws yooj yim los tswj PWM cov txiaj ntsig lossis cia tus neeg siv teeb tsa qhov sib txawv los ntawm tus swb.

Nyem Ntxiv Cov Ntawv Qhia Khoom dua thiab xaiv PWM Tso Tawm lossis Slider Input

Los ntawm lub neej ntawd cov ntawv qhia zaub mov no tau pib nrog qhov sib txawv sib txawv tau teeb tsa rau 0 txog 255 thiab Zaub Max teeb tsa rau 100 thiab Cov Kab Lus tom ntej teeb tsa rau '%' yog li rau Arduino cov laug cam sib xws koj tuaj yeem txuas cov ntawv qhia zaub mov no rau PWM muaj peev xwm pin thiab tswj PWM tso tawm los ntawm 0% txog 100% los ntawm kev zawv zawg slider. Tus swb yog nyob yog li koj tuaj yeem sim nws.

Nyem rau ntawm "Tsis txuas nrog tus pin I/O" txhawm rau txuas cov ntawv qhia zaub mov no rau PWM muaj peev xwm digital tso tawm, D5 piv txwv. Rau Uno cov laug cam PWM muaj peev xwm digital outputs yog D3, D5, D6, D9, D10 thiab D11. Rau Arduino 101 lawv yog D3, D5, D6 thiab D9. Txheeb cov lus tshwj xeeb ntawm pawg thawj coj tshwj xeeb uas koj tab tom siv los saib seb qhov twg tuaj yeem siv tau rau PWM.

Ib yam li lwm cov ntawv qhia zaub mov, koj tuaj yeem xaiv koj tus kheej cov ntawv, Zaub Max / Min, font font thiab lwm yam.

Nco tseg: tias Cov Ntaub Ntawv Hloov Pauv Ntau yam teev cov txiaj ntsig ntau qhov slider xa rov qab mus rau pfodDevice (koj Arduino). PfodApp ib txwm thiab tsuas yog xa qhov tseem ceeb ib yam, yog li thaum cov zaub hais tias 0 txog 100% tus slider tau xa rov qab tus nqi ib txwm nyob hauv thaj tsam 0 txog 255 raws li tau teeb tsa los ntawm Cov Khoos Phib Tawj Cov Hloov pauv Hloov pauv. Ntawm ESP8266 qhov pib PWM ntau yog 1023, yog li rau cov laug cam nyem qhov Hloov Kho Cov Ntaub Ntawv Hloov Pauv Hloov pauv thiab hloov Kho Tus Nqi Tshaj Plaws rau 1023. Tshaj tawm tias qhov no tsis hloov pauv Display Max uas tseem qhia tau 100%. Nws hloov pauv daim duab qhia chaw los ntawm qhov chaw swb, yog li 0 txog 1023 yuav muab tso tawm ua 0 txog 100%

Rov qab mus thiab saib cov ntawv qhia zaub mov dua.

Cov ntawv qhia zaub mov saib ua ntej no yog nyob thiab koj tuaj yeem txav tus swb. Yog tias koj ntxiv cov ntawv qhia zaub mov koj tseem tuaj yeem qhib lawv thiab taug kev hauv tib txoj kev pfodApp yuav.

Kauj Ruam 7: Tsim Cov Ntawv Qhia - On/Off Setting lossis Pulse

Tsim Cov Ntawv Qhia - On/Off Setting lossis Pulse
Tsim Cov Ntawv Qhia - On/Off Setting lossis Pulse
Tsim Cov Ntawv Qhia - On/Off Setting lossis Pulse
Tsim Cov Ntawv Qhia - On/Off Setting lossis Pulse
Tsim Cov Ntawv Qhia - On/Off Setting lossis Pulse
Tsim Cov Ntawv Qhia - On/Off Setting lossis Pulse
Tsim Cov Ntawv Qhia - On/Off Setting lossis Pulse
Tsim Cov Ntawv Qhia - On/Off Setting lossis Pulse

Cov ntawv qhia zaub mov tom ntej uas yuav tau ntxiv yog On/Off Setting lossis Pulse uas tso cai rau koj tswj cov digital tso tawm lossis tawm lossis ua rau nws mob.

Nyem Ntxiv Cov Khoom Qhia Ntxiv thiab xaiv On/Off Setting lossis Pulse

Koj tuaj yeem nyem qhov twg los hauv lub pob kom toggle qhov chaw. Ntawm no peb yuav siv cov ntawv qhia zaub mov no kom pulse Arduino LED (D13) rau 10 vib nas this. tom qab uas nws yuav tua. Cov ntawv qhia zaub mov yuav hloov kho ib zaug ib zaug (Lub Sijhawm ncua sijhawm tshiab uas koj tau teeb tsa rau cov ntawv qhia zaub mov no thaum pib ntawm qhov kev qhia no) los qhia qhov xwm txheej tam sim no ntawm kev coj. Koj tuaj yeem yuam nws coj mus tua thaum ntxov los ntawm kev nyem lub pob dua.

Teem Cov Ntawv Hloov Kho rau "LED yog" thiab Kho Cov Ntawv Tsawg rau "Tawm" thiab Kho Cov Ntawv Zoo rau "On". Nyem rau ntawm "Tsis txuas nrog tus pin I/O" txhawm rau txuas cov ntawv qhia zaub mov no rau D13. Nyem Zaub Cov Ntawv thiab Slider los Zaub Cov Ntawv nkaus xwb thiab ua kom cov font loj dua kom lub pob loj dua thiab yooj yim dua rau nyem. Koj kuj tseem tuaj yeem hloov cov ntawv ntawv me me, xim thiab lwm yam raws li koj xav tau. Ntawm no kuv tau teeb tsa Nyiaj keeb kwm yav dhau thiab Cov ntawv loj.

Txhawm rau teeb tsa tus mem tes ntev, nyem rau ntawm "Output is not pulsed" khawm thiab xaiv Pulsed High nyob rau sab saum toj slider. Teeb tsa 10 sec mem tes ntev.

Rov qab mus thiab saib cov ntawv qhia zaub mov dua.

Yog tias koj tsis nyiam txoj hauv kev nws zoo li koj tuaj yeem rov qab kho qhov kho kom raug Menu_1 screen thiab kho cov ntawv qhia zaub mov. Kuv xav tau chaw me ntsis ntxiv ntawm cov ntawv qhia zaub mov thiab cov ntawv loj dua rau Lub Qhov Rooj yog Qhib zaub.

Kauj Ruam 8: Tsim Cov Ntawv Qhia - Ntxiv Cov Ntawv Qhia Spacers

Tsim Cov Ntawv Qhia - Ntxiv Ntawv Qhia Spacers
Tsim Cov Ntawv Qhia - Ntxiv Ntawv Qhia Spacers
Tsim Cov Ntawv Qhia - Ntxiv Cov Ntawv Qhia Spacers
Tsim Cov Ntawv Qhia - Ntxiv Cov Ntawv Qhia Spacers

Rov qab mus rau Editing Menu_1 thiab nyem rau ntawm Add Menu Item thiab nqes mus thiab xaiv "Label"

Kho cov ntawv kom tshem tag nrho cov ntawv kom koj tau nyob nrog qhov chaw khoob. Koj tuaj yeem kho qhov chaw me me nrog Font Size setting. Ntawm no kuv tau teeb tsa me me spacer.

Kauj Ruam 9: Tsim Cov Ntawv Qhia - Tsiv Cov Ntawv Qhia Khoom

Tsim Cov Ntawv Qhia - Tsiv Cov Ntawv Qhia Khoom
Tsim Cov Ntawv Qhia - Tsiv Cov Ntawv Qhia Khoom
Tsim Cov Ntawv Qhia - Tsiv Cov Ntawv Qhia Khoom
Tsim Cov Ntawv Qhia - Tsiv Cov Ntawv Qhia Khoom

Ntxiv lwm qhov Spacer thib ob thiab tom qab ntawd rov qab mus rau Editing Menu_1 screen thiab nqes mus rau Tsiv Cov Khoom Nce/nqis

Nyem rau ntawm qhov no thiab xaiv daim ntawv lo kom txav mus thiab txav mus rau Qhov Rooj yog. Nws yuav muab tso rau saum lub Qhov Rooj yog cov khoom tso tawm. Tsiv lwm daim ntawv rau PWM tso nws nruab nrab ntawm Qhov Rooj thiab PWM. Thaum kawg kuv kuj tau ntxiv cov ntawv rau lub Qhov Rooj yog cov ntawv qhia zaub mov rau thiab ua rau nws siab tawv, los ntawm kev xaiv Kho kom raug cov ntawv qhia zaub mov thiab tom qab ntawd Qhov Rooj yog thiab kho lub pob ntawd

Cov ntawv qhia zaub mov ua ntej yog tam sim no

Kauj Ruam 10: Tsim Cov Ntawv Qhia - Ntxiv Daim Duab thiab Logging Cov Ntaub Ntawv

Tsim Cov Ntawv Qhia - Ntxiv Daim Duab thiab Cov Ntaub Ntawv Teev Npe
Tsim Cov Ntawv Qhia - Ntxiv Daim Duab thiab Cov Ntaub Ntawv Teev Npe
Tsim Cov Ntawv Qhia - Ntxiv Daim Duab thiab Cov Ntaub Ntawv Teev Npe
Tsim Cov Ntawv Qhia - Ntxiv Daim Duab thiab Cov Ntaub Ntawv Teev Npe
Tsim Cov Ntawv Qhia - Ntxiv Daim Duab thiab Cov Ntaub Ntawv Teev Npe
Tsim Cov Ntawv Qhia - Ntxiv Daim Duab thiab Cov Ntaub Ntawv Teev Npe

Thaum kawg peb yuav ntxiv Daim phiaj rau phiaj thiab teev tus nqi ntawm A0.

Rov qab mus rau Editing Menu_1 thiab nyem rau ntawm Add Menu Item thiab scroll down thiab xaiv Chart Button. pfodApp cia koj muaj ntau daim duab thiab phiaj xwm tab sis, kom yooj yim, pfodDesignerV2 tsuas tso cai rau ib lub pob kab ntawv ntawm cov ntawv tsim thiab tsuas yog txog 3 lub ntsiab lus ntawm daim ntawv ntawd. Thaum koj ntxiv Daim Chart Button, qhov kev xaiv ntawd raug tshem tawm. Nws yuav rov qab los yog tias koj rho tawm Daim Ntawv Cim Kab los ntawm koj cov ntawv qhia zaub mov, lossis yog tias koj pib ua cov ntawv qhia zaub mov tshiab uas siv Start Menu Tshiab khawm.

PfodSpecification muaj ntau daim phiaj thiab phiaj xwm xaiv. Tsis yog txhua ntawm lawv muaj nyob ntawm pfodDesignerV2. Txheeb xyuas pfodSpecification.pdf rau txhua cov ntsiab lus.

Koj tuaj yeem hloov kho Daim Ntawv Npe zoo li lwm lub pob. Ntawm no kuv yuav teeb cov ntawv ntawm lub pob no rau Voltage Plot nrog cov ntawv loj ntawm

Txhawm rau kho kab ntawv nws tus kheej, nyem rau ntawm Daim phiaj Kab Voltage Plot. Qhov ntawd yuav qhib qhov Editing Plots rau lub vijtsam.

Thaum koj hloov kho kab ntawv thiab nws cov phiaj xwm, koj tuaj yeem saib ua ntej qhov tshwm sim uas siv Daim Ntawv Qhia Ua Ntej khawm.

Siv koj lub xov tooj rov qab khawm rov qab mus rau qhov kho kom raug lub vijtsam.

Teem Kho Daim Duab Daim Ntawv Cim rau "Voltage ntawm A0" lossis daim ntawv lo koj xav tau. Kuj teeb Plot Data Interval. Lub sijhawm luv luv no uas koj Arduino yuav xa cov ntaub ntawv phiaj xwm rau kev txiav thiab phiaj xwm. Cov ntaub ntawv phiaj xwm tau txiav txim siab nkag mus rau ib daim ntawv ntawm koj lub xov tooj ntawm tes Android rau rub tawm thiab ua tiav ntxiv. Ntawm no kuv tau tawm ntawm cov phiaj xwm ncua ntawm 1 sec.

Nyem rau ntawm Edit Plot 1 kom qhib nws lub vijtsam kho.

Siv qhov kev tshuaj ntsuam no los teeb tsa Daim Ntawv Hloov Kho Cov Ntawv rau "A0" thiab Kho Cov Phiaj Xwm YAxis Chav rau "Volts"

Ib yam li Cov Ntaub Ntawv Cov Ntaub Ntawv saum toj no, teeb tsa Cov Phiaj Xwm Cov Ntaub Ntawv Hloov pauv thiab Zaub Max thiab Zaub Min kom cov phiaj xwm yuav nthuav tawm lub ntiaj teb tiag. Hauv qhov no cov ntaub ntawv ntau ntawm A0 yog 0 txog 1023 thiab sawv cev 0V txog 3.3V. Yog li tawm ntawm Cov Phiaj Xwm Cov Ntaub Ntawv Hloov pauv ntau li 0 txog 1023 thiab Kho Cov Duab Max rau 3.3

Nyem rau Tsis txuas nrog tus I/O tus pin txhawm rau txuas Cov Phiaj Xwm no rau tus pin A0 thiab nyem Cov Phiaj Xwm yog Pib Nplai rau toggle rau Cov Phiaj Xwm yog Nplai Tsau. Txhim kho qhov teev teev pib yAxis rau Zaub Max / Min, thaum Pib ntsuas ntsuas yAxis kom cia li tso saib cov ntaub ntawv. Nyob rau hauv txhua rooj plaub yog cov phiaj xwm cov ntaub ntawv ntau dua Zaub Max / Min cov phiaj yuav ib txwm pib ntsuas kom pom txhua cov ntaub ntawv.

Siv Daim Ntawv Qhia Ua Ntej khawm txhawm rau txheeb xyuas koj cov chaw. Koj tuaj yeem siv ob tus ntiv tes los nthuav cov phiaj hauv lossis tawm.

Thaum kawg nyem rau Hloov Kho Zaj 2 thiab Kho Zaj Lus 3 rau thiab nyem khawm Nkaum kom nkaum lawv vim peb tsuas yog npaj cov ntaub ntawv sib txawv hauv qhov piv txwv no. Daim phiaj Saib Ua Ntej tam sim no qhia tsuas yog ib lub ntsiab lus.

Rov qab mus rau Editing Menu_1 screen thiab xaiv Preview Menu qhia cov ntawv qhia zaub mov kawg.

Cov ntawv qhia zaub mov ua ntej no yog 'nyob'. Koj tuaj yeem txav PWM slider thiab hloov lub LED rau thiab tawm thiab nyem rau ntawm Voltage Plot khawm kom qhib lub phiaj xwm tshuaj ntsuam.

Rov qab rau hauv Editing Menu_1 screen koj tuaj yeem tshem cov khawm uas tsis xav tau ntxiv nrog rau hloov cov npe khoom noj. Cov ntawv qhia zaub mov lub npe yog rau koj siv xwb. Nws tau qhia nyob rau hauv cov npe ntawm Cov Menus Muaj, tab sis tsis tshwm rau tus neeg siv thaum cov ntawv qhia zaub mov tshwm ntawm pfodApp.

Kauj Ruam 11: Tsim Arduino Code

Tsim kom tau Arduino Code
Tsim kom tau Arduino Code
Tsim kom muaj Arduino Code
Tsim kom muaj Arduino Code
Tsim kom tau Arduino Code
Tsim kom tau Arduino Code

Tam sim no koj tau ua tiav qhov kev tsim qauv koj tuaj yeem nyem Tsim Cov Cai los qhib Cov Ntawv Tsim Cov Cai.

Los ntawm cov ntawv qhia zaub mov no koj tuaj yeem hloov kho yam khoom twg uas koj siv los sib txuas lus nrog. Arduino 101 siv BLE (Bluetooth Tsawg Zog) rau kev sib txuas lus yog li nyem rau Hloov Lub Hom Phiaj thiab xaiv Bluetooth Tsawg Zog (BLE) thiab tom qab ntawd xaiv Arduino/Genuino 101. Yog tias koj siv kho vajtse sib txawv xaiv lub hom phiaj tsim nyog. Feem ntau cov ntaub thaiv npog kev sib txuas ntawm arduino txuas ntawm Serial ntawm 9600, tab sis txheeb xyuas qhov tshwj xeeb rau koj cov ntaub thaiv npog tshwj xeeb.

Siv lub khawm rov qab kom rov qab mus rau qhov tsim cov lej screen.

Thaum kawg nyem rau ntawm Sau Cov Cai rau ua cov ntaub ntawv los tsim Arduino kos duab rau cov ntawv qhia zaub mov no rau Arduino 101. Lub pob no sau cov duab kos rau hauv cov ntawv ntawm koj lub xov tooj thiab qhia txog 4k bytes kawg hauv ib qho screen.

Kauj Ruam 12: Hloov daim Sketch mus rau koj lub Computer

Hloov daim Sketch mus rau koj lub Computer
Hloov daim Sketch mus rau koj lub Computer

Koj tuaj yeem tawm pfodDesignerV2 tam sim no, koj tus qauv tsim tau raug cawm thiab muaj nyob hauv "Kho kom raug cov ntawv qhia zaub mov". Koj YUAV TSUM tawm ntawm pfodDesignerV2 kom ntseeg tau tias qhov kawg ntawm cov cai tau sau rau hauv cov ntawv.

Txuas koj lub xov tooj ntawm tes rau koj lub khoos phis tawj thiab qhib lub USB Storage, lossis siv Wifi File Transfer App kom nkag tau koj lub xov tooj ntawm tes los ntawm koj lub computer. (Saib pfodAppForAndroidGettingStarted.pdf kom paub meej ntxiv) Nco tseg: pfodDesignerV2 tsis tuaj yeem nkag mus rau daim npav SD kom txuag tau cov cai tsim thaum nws tau nkag los ntawm lub khoos phis tawj raws li USB Cia, yog li tig ntawm USB Cia ua ntej siv pfodDesignerV2 dua.

Nkag mus rau /pfodAppRawData thiab qhib pfodDesignerV2.txt hauv cov ntawv sau (xws li WordPad). PfodDesignerV2.txt cov ntaub ntawv tau sau dua rau txhua lub sijhawm koj nyem "Tsim Cov Cai".

Qhib Arduino IDE thiab tsim daim duab tshiab, tshem tawm cov cai los ntawm lub qhov rais kos duab thiab tom qab ntawd theej thiab hla cov lej tsim rau hauv Arduino IDE. Ib daim qauv ntawm cov cai tsim tawm nyob ntawm no.

Txhawm rau sau cov cai no rau Arduino 101 koj xav tau nruab pfodParser library V2.35+ los ntawm https://www.forward.com.au/pfod/pfodParserLibraries/index.html. Qee lub hom phiaj, xws li Serial, tsis xav tau lub tsev qiv ntawv no. Sab saum toj ntawm cov ntawv tsim tawm yuav qhia yog tias nws xav tau kev teeb tsa.

Kauj Ruam 13: Txheeb thiab Kuaj Koj Cov Ntawv Qhia

Sau thiab Xeem Koj Cov Ntawv Qhia
Sau thiab Xeem Koj Cov Ntawv Qhia
Sau thiab Xeem Koj Cov Ntawv Qhia
Sau thiab Xeem Koj Cov Ntawv Qhia
Sau thiab Xeem Koj Cov Ntawv Qhia
Sau thiab Xeem Koj Cov Ntawv Qhia

Sau thiab xa cov duab kos mus rau Arduino 101 lossis pawg thawj coj twg koj siv. Yog tias koj siv daim ntaub thaiv txuas nrog Serial nco ntsoov tshem daim thaiv ua ntej lub phiaj xwm raws li daim thaiv feem ntau txuas nrog tib tus pin (D0 thiab D1) raws li USB.

Nruab pfodApp los ntawm GooglePlay thiab teeb tsa kev sib txuas rau koj pawg thawj coj, raws li tau piav qhia hauv pfodAppForAndroidGettingStarted.pdf.

Ntawm kev txuas mus rau Arduino 101, pfodApp yuav tso saib koj cov ntawv tsim. Tam sim no koj nyem lub pob LED kom tig lub teeb rau 10sec thiab tom qab ntawv tua. Cov ntawv qhia zaub mov yuav hloov kho rau LED yog Tawm thaum lub qhov hluav taws xob tua. Yog tias koj txuas D4 cov tswv yim rau GND ces cov ntawv qhia zaub mov yuav qhia Qhov Rooj Kaw.

Koj tuaj yeem siv PWM swb los tswj qhov hluav taws xob nkag mus rau A0. Txuas 47K resistor los ntawm D5 rau A0 thiab txuas 470nF capacitor los ntawm A0 rau GND (Nco tseg: Yog tias lub tshuab hluav taws xob koj siv tau muaj +/- xyuas kom tseeb tias- txuas rau GND). Qhov RC network no ua kom yooj yim rau PWM sib kis kom muab qhov kwv yees kwv yees DC voltage. Tom qab ntawd thaum koj kho PWM qhov ntsuas hluav taws xob ntsuas ntawm A0 hloov pauv thiab cov ntawv qhia zaub mov qhia pom qhov hloov pauv tus nqi.

Cov phiaj xwm tseem yuav qhia qhov sib txawv ntawm qhov ntsuas ntawm A0.

Koj tuaj yeem siv ob tus ntiv tes txhawm rau txhawm rau txhawm rau txhawm rau saib lub ripple ntawm txhua qib.

Yog tias koj saib ntawm pfodApp's Debug View nkag los ntawm koj lub xov tooj ntawm tes koj yuav pom cov ntawv qhia zaub mov hloov tshiab luv heev vim pfodApp caches cov ntawv qhia zaub mov thiab tom qab Arduino kos duab tsuas yog xa cov txiaj ntsig hloov tshiab rau txhua cov ntawv qhia zaub mov es tsis txhob xa tag nrho cov ntawv qhia zaub mov txhua thib ob. Yog tias koj saib ntawm pfodApp's Raw Data view, koj yuav pom cov ntaub ntawv CSV cov ntaub ntawv uas tau xa thiab nkag mus. Nov yog qhov chaw uas cov phiaj xwm tau txais nws cov ntaub ntawv los ntawm. Ob,, qhov kawg ntawm txhua cov ntaub ntawv yog qhov chaw tuav rau thaj tsam 2 thiab phiaj 3 cov ntaub ntawv uas tsis tau siv hauv qhov piv txwv no.

Kauj Ruam 14: Tau Txais Cov Phiaj Xwm Cov Ntaub Ntawv

Tau Txais Cov Ntaub Ntawv Plot
Tau Txais Cov Ntaub Ntawv Plot

pfodApp cia li txuag cov phiaj xwm cov ntaub ntawv ntawm koj lub xov tooj ntawm tes hauv qab cov npe /pfodAppRawData, hauv cov ntawv uas muaj tib lub npe zoo li kev sib txuas, nrog txhua qhov chaw hloov nrog _. Piv txwv li yog tias kev sib txuas koj tsim hauv pfodApp los txuas rau Arduino 101 tau raug npe los ntawm koj li "Arduino 101" ces cov phiaj xwm cov ntaub ntawv tau khaws tseg hauv cov ntawv /pfodAppRawData/Arduino_101.txt

Lub npe ntawm cov ntaub ntawv raw cov ntaub ntawv tseem pom los ntawm pfodApp thaum koj tawm ntawm lub app.

Koj tuaj yeem xa cov ntaub ntawv phiaj xwm no mus rau koj lub khoos phis tawj rau kev ua haujlwm ntxiv.

Kauj Ruam 15: Cov Kauj Ruam Tom ntej

Qhov no ua kom tiav cov ntawv qhia. Bluetooth Tsawg Zog (BLE) ua yooj yim nrog pfodApp muaj piv txwv ntawm kev siv ntau yam ntxiv BLE cov ntaub thaiv npog. Yooj Yim Hauv Tsev Automation rau Cov Pib Pib saib ntawm txuas txuas, yog li koj tuaj yeem hloov qhov tiag thiab qhib.

Tab sis pfodApp tuaj yeem ua tau ntau dua li qhov no. Cov txheej txheem pfod yog qhov nplua nuj tab sis yooj yim thiab muaj ntau yam ntxiv tsuas yog cov ntawv yooj yim. Txheeb xyuas tag nrho pfodSpecification.pdf rau txhua cov ntsiab lus thiab piv txwv. Kuj pom www.pfod.com.au rau ntau qhov haujlwm piv txwv. Txhua lub vijtsam siv los ntawm pfodDesignerV2 yog cov qauv pfod cov ntxaij vab tshaus. PfodDesignerV2 tsuas yog pfodApp txuas nrog rau tom qab-kawg uas taug qab koj qhov kev xaiv thiab ua haujlwm raws cov lus thov. Los ntawm pfodDesignerV2 koj tuaj yeem siv lub xov tooj ntawm tes khawm kom qhib Debug View kom pom dab tsi pfod cov lus raug xa los tsim pfodDesignerV2 cov ntxaij vab tshaus thiab cov lus txib tau xa rov qab los ntawm koj li kev ua.

Pom zoo: