Cov txheej txheem:

Redbear BLE Nano V2 Kev Tswj Tus Kheej Nrog PfodApp - Tsis tas yuav tsum muaj tus lej: 6 Kauj Ruam
Redbear BLE Nano V2 Kev Tswj Tus Kheej Nrog PfodApp - Tsis tas yuav tsum muaj tus lej: 6 Kauj Ruam

Video: Redbear BLE Nano V2 Kev Tswj Tus Kheej Nrog PfodApp - Tsis tas yuav tsum muaj tus lej: 6 Kauj Ruam

Video: Redbear BLE Nano V2 Kev Tswj Tus Kheej Nrog PfodApp - Tsis tas yuav tsum muaj tus lej: 6 Kauj Ruam
Video: 7 txoj kev khwv nyiaj, yuav tau paub los mus hloov yus lub neej 2024, Hlis ntuj nqeg
Anonim

Los ntawm drmpfpfodApps thiab pfodDevicesFollow Ntxiv los ntawm tus sau:

Chav Rhaub Tswj Via BLE Kub Sensor
Chav Rhaub Tswj Via BLE Kub Sensor
Chav Dej Rhaub Tswj Via BLE Kub Sensor
Chav Dej Rhaub Tswj Via BLE Kub Sensor
Taming Arduino Strings - Yuav Ua Li Cas Kom Tsis Txhob Muaj Teeb Meem
Taming Arduino Strings - Yuav Ua Li Cas Kom Tsis Txhob Muaj Teeb Meem
Taming Arduino Strings - Yuav Ua Li Cas Kom Tsis Txhob Muaj Teeb Meem
Taming Arduino Strings - Yuav Ua Li Cas Kom Tsis Txhob Muaj Teeb Meem
LoRa Tswj Lub Nkoj Qhov Rooj
LoRa Tswj Lub Nkoj Qhov Rooj
LoRa Tswj Lub Nkoj Qhov Rooj
LoRa Tswj Lub Nkoj Qhov Rooj

Hloov kho: 15th Cuaj Hlis 2017 - Cov lus qhia no tau hloov kho kom siv qhov tshiab tshaj plaws ntawm RedBear BLE Nano, V2. Cov ntawv dhau los ntawm cov lus qhia no, uas tau tsom mus rau RedBear BLE Nano V1.5 muaj nyob ntawm no.

Hloov Kho 15th Kaum Ib Hlis - 2017 Qee BLE cov laug cam / software sib dhos xa tib lub cmd ob zaug ua tiav sai. Hloov tshiab rau pfodApp V3.322+ thiab pfodParser V3.17+ los daws qhov no. pfodApp V3.322+ ntxiv tus lej cmd ua ntu zus thiab pfodParser V3.17+ lim tawm cov ntawv sib txawv cmds

Tsis muaj ib qho ntawm cov ntxaij vab tshaus no nyuaj rau pfodApp (Android app). Txhua cov ntxaij vab tshaus saum toj no tau ua tiav los ntawm cov cai hauv koj RedBear BLE Nano V2

Cov ntawv qhia no qhia txog kev tswj hwm tus kheej rau RedBear BLE Nano V2 tus qauv. Nws nyob hauv ob ntu:-

Thawj ntu nthuav qhia "pib" kos duab, uas thaum thauj mus rau koj li RedBear BLE Nano V2, yuav tso saib cov duab sib tham ntawm pfodApp uas yuav qhia rau koj nyeem Analog thiab Digital inputs. Hloov cov pins digital rau cov zis/PWM thiab teeb tsa qhov tso tawm/PWM qhov tseem ceeb.

Qhov thib ob siv pfodDesigner pub dawb los tsim cov kev cai ntau qib, cov phiaj xwm thiab cov ntaub ntawv txiav uas tuaj yeem nthuav tawm ntawm pfodApp. PfodDesigner tsim txhua txoj hauv kev hauv Android uas xav tau rau RedBear BLE Nano V2. Lub hom phiaj dav pfodApp saib xyuas cov neeg siv khoom saib thiab cuam tshuam ntawm koj lub xov tooj hauv. Tus neeg siv khoom tso tawm yog tswj tau tag nrho los ntawm Android code koj thauj mus rau koj li Nano. Tsis xav tau Android programming.

Kauj Ruam 1: RedBear BLE Nano V2 Starter Sketch

Cov yeeb yaj kiab-g.webp

Txhawm rau khiav daim duab no koj xav tau:-

  1. RedBearLab BLE Nano V2 Cov Khoom - BLE Nano module thiab cov qauv txheej txheem https://redbearlab.com/buy/ ~ US $ 30
  2. USB txuas txuas txuas (xaiv tau tab sis muaj txiaj ntsig) - https://www.sparkfun.com/products/13309 ~ US $ 2
  3. pfodApp - Android app https://redbearlab.com/buy/ ~ Asmeskas 10
  4. Arduino IDE V1.8.4 -
  5. thiab txhawb nqa cov tsev qiv ntawv (saib ceeb toom hauv qab no txog kev hloov kho BLEPeripheral library los ntawm V0.4.0 txog V0.5.0)

Kauj Ruam 2: Kev teeb tsa ntawm Kev Pib Sketch

Kev teeb tsa ntawm Starter Sketch
Kev teeb tsa ntawm Starter Sketch
  1. Nruab Arduino IDE V1.8.4 los ntawm
  2. Ua raws li Arduino teeb tsa qhia https://github.com/redbear/nRF5x/blob/master/nRF5…Add https://redbear.github.io/arduino/package_redbear… Arduino Ntxiv Boards Manager URLs (hauv File-> Preferences) thiab tom qab ntawd siv Arduino Board Manager los teeb tsa RedBear nRF52832 boards V0.0.2 (lim koj qhov kev tshawb nrhiav rau RedBear)

  3. Nruab BLEPeripheral lub tsev qiv ntawv. Qhib Tus Thawj Saib Xyuas Tsev Qiv Ntawv hauv Arduino IDE thiab ntaus BLEPeripheral hauv kab tshawb nrhiav. Xaiv BLEPeripheral los ntawm Sandeep Mistry V0.5.0 thiab nruab nws.

    Nco tseg: BLEPeripheral V0.5.0 tsis raug tso tawm txij hnub tim 14 lub Cuaj Hli 2017, yog li nruab V0.4.0 thiab tom qab ntawd rov sau dua cov nRF51822.h thiab nRF51822.cpp cov ntaub ntawv nrog cov ntaub ntawv kho tshiab hauv daim ntawv zip no, nRF51822.zip. Ib daim ntawv theej ntawm V0.4.0 arduino-BLEPeripheral-master.zip cov ntaub ntawv nyob ntawm no.

  4. Khaws tus kheej rub tawm thiab pfodParser.zip thiab pfodDwgControls.zip cov tsev qiv ntawv los ntawm no thiab tom qab ntawd siv Arduino IDE cov ntawv qhia zaub mov xaiv Sketch → Import Library → Ntxiv Library rau nruab lawv.
  5. Unzip daim duab no RedbearBLENanoV2Starter.zip thiab nws cov chav txhawb nqa rau koj qhov chaw Aduino Sketchbook (pom hauv Cov Ntawv → Nyiam).
  6. Qhib Arduino IDE, xaiv BLE Nano board, (kuv pawg thawj coj yog V1.5) thiab qhib RedbearBLENanoV2Starter.ino kos duab thiab suav sau thiab rub mus rau BLE Nano V2 tus qauv. Txhawm rau ua haujlwm nws koj yuav tsum tau ntxiv USB daim thaiv uas tau hais los saum no (hauv qab lub rooj tsavxwm tseem ceeb). Thaum lub USB thaiv tau tsim los ntsaws ncaj qha rau koj lub USB chaw nres nkoj, Kuv pom tias tsis yooj yim heev ntawm kuv lub laptop yog li kuv ntxiv USB txuas txuas. BLE Nano V2 tam sim no muaj tag nrho cov cai tsim nyog los kos cov duab sib tham thiab ua cov txheej txheem ntawm tus neeg siv.
  7. Nruab pfodApp ntawm koj Android Txawb. Koj yuav xav tau lub xov tooj ntawm tes nrog Android OS V4.4 lossis siab dua thiab ib qho uas txhawb nqa Bluetooth Tsawg Zog. Tom qab ntawd tsim BLE txuas rau koj BLE Nano, raws li tau piav qhia hauv pfodAppForAndroidGettingStarted.pdf. Thaum kawg txuas, thiab pfodApp yuav thauj cov duab qhia saum toj no. Thaum cov duab rub tawm, pfodApp caches nws yog li tom ntej no BLE Nano V2 tsuas yog xav tau xa qhov hloov tshiab.

Cov duab kos uas koj tau thauj khoom siv pfodApp kos duab txheej thaum ub los kos cov phiaj xwm phiaj xwm thiab cov nyees khawm thiab txhawm rau txheeb xyuas cov neeg siv thaj chaw thiab ua. Kev Cai Tswj Arduino rau Android kev qhia qhia txog yuav ua li cas rau koj tus kheej kev tswj hwm thiab Arduino101 Starter, tswj los ntawm Android/pfodApp qhia piav qhia yuav ua li cas Zoom thiab Pan ua haujlwm.

Tshooj lus tom ntej piav qhia yuav siv li cas WISIWYG pfodDesigner dawb los tsim cov ntawv qhia zaub mov ntau qib los tswj cov txiaj ntsig thiab nyeem thiab npaj thiab teev cov lus sib piv thiab tsim txhua txoj cai xav tau rau koj RedBear BLE Nano.

Kauj Ruam 3: Tsim Kev Cai Android Menus rau RedBear BLE Nano thiab Tsim Txoj Cai

Tsim Kev Cai Android Menus rau RedBear BLE Nano thiab Tsim Txoj Cai
Tsim Kev Cai Android Menus rau RedBear BLE Nano thiab Tsim Txoj Cai

Pub dawb pfodDesignerV2 Android app tso cai rau koj tsim cov ntawv tshwj xeeb thiab tom qab ntawd tsim txhua txoj cai rau koj qhov tshwj xeeb BLE module. pfodApp yog tom qab siv los tso tawm koj cov ntawv qhia zaub mov ntawm koj lub xov tooj ntawm tes thiab cia koj tswj koj tus qauv.

Tsis tas yuav muaj Android lossis Arduino coding

PfodDesignerV2 pub dawb tau siv los tsim cov ntawv qhia zaub mov hauv WISIWYG zam thiab qhia koj qhov tseeb ua ntej ntawm yuav ua li cas cov ntawv qhia zaub mov yuav zoo ntawm koj lub xov tooj. PfodDesignerV2 tso cai rau koj los tsim cov ntawv qhia zaub mov thiab sub-menus nrog cov nyees khawm thiab swb xaiv tau txuas nrog I/O pins thiab tsim cov lej kos rau koj (saib pfodDesigner piv txwv qhia) tab sis pfodDesignerV2 tsis npog tag nrho cov yam ntxwv pfodApp txhawb nqa. Saib pfodSpecification.pdf kom ua tiav cov npe suav nrog cov ntaub ntawv nkag mus thiab phiaj xwm, ntau yam thiab xaiv ib leeg cov ntxaij vab tshaus, sliders, cov ntawv nkag, thiab lwm yam.

Tsim cov ntawv qhia tshwj xeeb kom tig RedBear BLE Nano V2 LED qhib thiab tua

Kev qhia Tsim Cov Ntawv Qhia Tus Kheej kom tig Arduino Led rau thiab tawm muaj cov lus qhia ib qib zuj zus rau kev tsim cov ntawv qhia no siv pfodDesignerV2. Yog tias koj tsis nyiam cov xim ntawm cov font loj lossis cov ntawv, koj tuaj yeem hloov kho lawv yooj yim hauv pfodDesignerV2 rau yam koj xav tau thiab pom WYSIWYG (Koj Pom Dab Tsi Yog Dab Tsi Koj Tau Txais) tso tawm ntawm cov ntawv qhia zaub mov tsim.

Tsuas muaj ib qho kev hloov pauv rau RedBear BLE Nano V2 thiab qhov ntawd yog teeb tsa nws ua Lub Hom Phiaj rau lub tshuab tsim hluav taws xob rau cov ntawv qhia zaub mov tshiab ua ntej ntxiv Led tswj cov ntawv qhia zaub mov.

Kauj Ruam 4: Xaiv RedBear BLE Nano V2 Raws li Lub Hom Phiaj rau Txoj Cai Tsim

Xaiv RedBear BLE Nano V2 Raws li Lub Hom Phiaj rau Txoj Cai Tsim
Xaiv RedBear BLE Nano V2 Raws li Lub Hom Phiaj rau Txoj Cai Tsim
Xaiv RedBear BLE Nano V2 Raws li Lub Hom Phiaj rau Txoj Cai Tsim
Xaiv RedBear BLE Nano V2 Raws li Lub Hom Phiaj rau Txoj Cai Tsim
Xaiv RedBear BLE Nano V2 Raws li Lub Hom Phiaj rau Txoj Cai Tsim
Xaiv RedBear BLE Nano V2 Raws li Lub Hom Phiaj rau Txoj Cai Tsim
Xaiv RedBear BLE Nano V2 Raws li Lub Hom Phiaj rau Txoj Cai Tsim
Xaiv RedBear BLE Nano V2 Raws li Lub Hom Phiaj rau Txoj Cai Tsim

Ua ntej koj yuav tsum xaiv RedBear BLE Nano ua lub Hom Phiaj rau kev tsim cov cai. Thaum koj pib cov ntawv qhia zaub mov tshiab lossis hloov kho cov ntawv qhia zaub mov uas twb muaj lawm, lub pob saum toj qhia cov Phiaj Xwm Phiaj Xwm. Lub neej ntawd yog Serial.

Nyem rau ntawm Lub Hom Phiaj khawm kom qhib Lub Hom Phiaj xaiv.

Xaiv Bluetooth Tsawg Zog khawm thiab nqes mus nrhiav RedBearLab BLE Nano V2 xaiv thiab nyem rau nws.

Tom qab ntawd siv lub xov tooj rov qab khawm kom tawm ntawm Lub Hom Phiaj xaiv lub vijtsam thiab rov qab mus rau Khoos phib tawj Khoos phis tawj.

Kauj Ruam 5: Hloov pauv Qhov Taw Qhia/Tawm - Tsis Xav Tau rau BLE Nano V2

Kev Sib Hloov ntawm Qhov Taw Qhia/Tawm - Tsis Xav Tau rau BLE Nano V2
Kev Sib Hloov ntawm Qhov Taw Qhia/Tawm - Tsis Xav Tau rau BLE Nano V2

Cov ntawv dhau los, RedBear BLE Nano V1.5 muaj lwm qhov sib txawv. Nws yog LED ua haujlwm qis. Qhov ntawd yog thaum qhov tso tawm los ntawm D13 yog LOW cov coj yog ON.

Ntawm Nano V2, LED ua haujlwm siab heev yog li tsis muaj dab tsi ua ntawm no.

Qhov ntawd ua tiav qhov hloov pauv xav tau. Tam sim no koj tuaj yeem txuas ntxiv nrog Tsim Tus Qauv Ntawv qhia zaub mov kom tig Arduino Led qhib thiab tawm qhia kom Tsim Txoj Cai, hloov nws mus rau koj lub computer thiab suav sau thiab rub mus rau koj RedBear BLE Nano V2. Ib daim ntawv theej ntawm daim duab kos duab nyob ntawm no (BLENanoV2LedController.ino)

Tom qab ntawv txuas ntawm pfodApp los ntawm koj lub xov tooj los tso saib cov ntawv qhia zaub mov uas koj nyuam qhuav tsim thiab tswj Led los ntawm ob qho tib si nyem qhov twg los khawm lossis zawv zawg.

Kauj Ruam 6: Txhim Kho BLE Nano Control Menu

Txhim kho BLE Nano Control Menu
Txhim kho BLE Nano Control Menu
Txhim kho BLE Nano Control Menu
Txhim kho BLE Nano Control Menu

Siv Led Tus Thawj Coj los ua lub hauv paus, koj tuaj yeem ntxiv cov ntawv qhia zaub mov ntau ntxiv rau kev nyeem lossis tswj hwm lwm tus Digital pins thiab rau kev nyeem ntawv, phiaj xwm thiab txiav cov Analog inputs, A4 thiab A5. Txheeb xyuas ntau yam pfodDesigner cov lus qhia ntawm kev siv ntau yam khoom noj khoom haus. Yuav Ua Li Cas Qhia Cov Ntaub Ntawv Arduino ntawm Android rau Cov Pib Qhia qhia npog tsim cov phiaj xwm.

Cov duab kos tau tsim nyob ntawm no (BLE_NanoV2Controller.ino)

Ntxiv rau kev npaj cov txiaj ntsig Analog, kev nyeem ntawv kuj tseem raug nkag, hauv CSV hom ntawv, rau cov ntaub ntawv ntawm koj lub xov tooj rau siv tom qab.

Cov Qauv Ntsuas

PfodDesignerV2 tsuas yog txhawb nqa ib txheej ntawm cov ntxaij vab tshaus uas pfodApp txhawb nqa. Txog daim ntawv teev npe tiav saib pfodSpecification.pdf. SampleRedBearBLENanoV2Screens.ino kos duab suav nrog cov ntxaij vab tshaus ntxiv los ntawm pfodApp tab sis tsis suav nrog hauv pfodDesigner. Feem ntau ntawm cov ntxaij vab tshaus tsis muaj kev teeb tsa los khaws cov lus kom meej thiab yooj yim. Tus xaiv xim nyob hauv Sliders yog qhov zam. Koj tuaj yeem ntxiv koj tus kheej xim thiab tus cwj pwm, siv pfodDesignerV2 ua tus qhia. Kuj pom pfodDemo Android app rau lwm qhov piv txwv.

SampleRedBearBLENanoV2Screens.ino kos duab xav tau pfodParser.zip thiab pfodDwgControls.zip cov tsev qiv ntawv yuav tsum tau teeb tsa ua ntej.

Xaus

Cov ntawv qhia no tau qhia tias koj tuaj yeem sib txuas lus tau yooj yim nrog thiab tswj RedBearLab BLE Nano cov laug cam Tsis tas yuav siv lub program Android. pfodApp ua haujlwm txhua qhov ntawd. Tsis xav tau Arduino coding. (Pub dawb) pfodDesignerV2 tsim cov duab kos tiav rau qhov no thiab ntau yam ntawm lwm cov qauv suav nrog ESP8266 thiab WiFi, Bluetooth thiab daim thaiv thaiv SMS. Vim tias tsis muaj tus qauv rau lub hom phiaj dav dav UART kev txuas rau BLE lub cuab yeej, pfodApp tau teeb tsa ua ntej tus lej ntawm BLE cov laug cam 'kev sib txuas tsis sib xws yog li koj tuaj yeem siv tib pfodApp rau txhua tus ntawm lawv.

Pom zoo: