Cov txheej txheem:
- Kauj Ruam 1: Khoom Loj
- Kauj ruam 2: Pin
- Kauj Ruam 3: Nco Ntsoov 1:
- Kauj Ruam 4: Cov Cim Hluav Taws Xob:
- Kauj ruam 5: Phau ntawv AT Command
- Kauj Ruam 6: Hais Kom Piav
- Kauj Ruam 7: 12.Set Hom Ua Haujlwm (Tsuas Qhua Module)
- Kauj Ruam 8: Siv Schematic
- Kauj ruam 9: Qhov chaw
Video: HC-08 Bluetooth UART Kev Sib Txuas Lus V2.4 Tus Neeg Siv Qhia: 9 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Khoom Taw Qhia
Bluetooth Modem - Yam Tsawg Dhau -dhau Module HC08 yog lub cim tshiab cim cov ntaub ntawv xa tawm raws li Bluetooth Specification V4.0 BLE raws tu qauv. Nws cov wireless ua haujlwm ntau zaus yog 2.4GHz ISM nrog GFSK txoj kev hloov kho. Lub zog xa tawm siab tshaj yog 4d Bm. Nws tau txais qhov rhiab heev yog -93d Bm. Hauv qhov qhib dav ib puag ncig, nws tuaj yeem ncav cuag 80m super ntev-kev sib txuas lus nrog iphone4s. Nws muaj kev sib xyaw ua ke pob pob qhov thiab pins vuam qhov. Koj tuaj yeem ua ob lub pob thiab txuas cov pins. Nws yog qhov yooj yim heev uas yuav tsum tau kos rau hauv daim ntawv thov. Nrog built-in qhov taw qhia LED, koj tuaj yeem pom qhov pom kev sib txuas ntawm Bluetooth. Cov qauv no txais yuav cov tub ntxhais CC2540F256 teeb tsa 256K me ntsis. Nws txhawb AT cov lus txib. Cov neeg siv tuaj yeem hloov lub luag haujlwm (tus tswv/hom qhev) nrog rau qhov tsis xws li Baud tus nqi thiab lub npe ntaus ntawv raws li lawv tus kheej xav tau. Nws yog yoog raws siv.
Kauj Ruam 1: Khoom Loj
Tus pin txhais
HC-08 tus qauv muaj 30 tus pin ntawm lub nkoj. Cov ntsiab lus tshwj xeeb ntawm cov pins tau teev tseg hauv cov lus hauv qab no:
Kauj ruam 2: Pin
Tus Pin |
Txhais |
Kuv/O |
Piav qhia |
1 | TXD | tso tawm | UART cov zis, 3.3V TTL qib |
2 | RXD | tswv yim, tsis muaj zog rub tawm | UART cov tswv yim, 3.3V TTL qib |
3 | NC | ||
4 | NC | ||
5 | NC | ||
6 | DC | tswv yim | Debug moos |
7 | DD | Tswv yim/tso tawm | Debug cov ntaub ntawv |
8 | PIB 20 | tswv yim, tsis muaj zog rub tawm | NC |
9 | PIB 17 | tswv yim, tsis muaj zog rub cia | NC |
10 | PIB 16 | Tawm tswv yim, tsis muaj zog rub cia | NC |
11 | RST | tswv yim, rub tawm | Module pib dua tus pin, qib qis tsis pub tsawg dua 10ms rov pib dua |
12 | VCC | tswv yim | Tus pin fais fab, qhov xav tau ntawm 3.3V DC fais fab mov, |
cov khoom siv tam sim no tsis tsawg dua 100mA | |||
13 | GND | Hauv av | |
14 | LEDCON | tswv yim | LED tswj tus pin (Note3) |
15 | PIB 14 |
tswv yim, tsis muaj zog rub cia |
NC |
16 | PIB 13 | tso tawm | LED tso zis (Ceeb toom 1) |
17 | PIB 11 | tswv yim, tsis muaj zog rub cia | NC |
18 | PIB 12 | tswv yim, tsis muaj zog rub cia | Tus tswv lub tswv yim nco nco (Note2) |
19 | PIB 10 | tswv yim, tsis muaj zog rub cia | NC |
20 | PIB 07 | tswv yim, tsis muaj zog rub tawm | NC |
21 | USB_D- | NC | |
22 | USB_D+ | NC | |
23 | PIB 06 | tswv yim, tsis muaj zog rub tawm | NC |
24 | PIB 01 | tswv yim, tsis muaj zog rub tawm | NC |
25 | PIB 15 | tswv yim, tsis muaj zog rub cia | NC |
26 | PIB 00 | tswv yim, tsis muaj zog rub tawm | |
27 | VCC | tswv yim | Tus pin fais fab, qhov xav tau ntawm 3.3V DC fais fab mov, |
cov khoom siv tam sim no tsis tsawg dua 100mA | |||
28 | GND | Hauv av | |
29 | RXD | tswv yim, tsis muaj zog rub tawm | UART cov tswv yim, 3.3V TTL qib |
30 | TXD | tso tawm | UART cov zis, 3.3V TTL qib |
Kauj Ruam 3: Nco Ntsoov 1:
PIO13 qhia LED tus pin tso tawm, qib siab tso tawm. Thov txuas LED nrog kev ua haujlwm tsis sib thooj.
Ua ntej Kev Sib Txuas:
Thaum tus tswv qauv tsis sau qhov chaw nyob ntawm tus qhev module, nws yuav ci rau 100ms ib pliag;
Thaum tus tswv qauv sau qhov chaw nyob ntawm tus qhev module, nws yuav ci rau 900ms ib pliag;
Hauv tus qauv qhev, LED ci rau 1 thib ob nruab nrab ntawm txhua 2 vib nas this.
Tom qab txuas: LED teeb ib txwm pom kev.
Nco tseg 2:
Tus lej nkag, sab hauv rub tawm. Tus pin no txuas nrog qib hluav taws xob siab. Tus qauv tswv yog siv los tshem tawm qhov chaw nyob kaw ntawm tus qhev module.
Nco tseg 3:
Tus pin nkag, siv los tswj cov LED. Yog tias tus pin no tau tsaws, LED tawm. Yog tias tus pin no tseem tshuav dai, LED rau.
Kauj Ruam 4: Cov Cim Hluav Taws Xob:
Parameter | Kuaj Mob | Tus Neeg Sawv Cev Tus Nqi |
Ua hauj lwm Voltage | - | DC2.0V ~ 3.6V |
Tswv | tsis txuas / txuas | 21mA/9mA |
Ua Haujlwm Tam Sim No | MODE0, tsis txuas nrog / txuas | 8.5mA/9mA |
MODE1, tsis txuas nrog / txuas |
340μA/1.6mA | |
Tsis yog LED | Qhev | |
MODE2, tsis txuas nrog / txuas | 0.4μA/1.6mA | |
MODE3, tsis txuas nrog / txuas | 1.2μA-160μA/1.6mA |
Kauj ruam 5: Phau ntawv AT Command
AT cov lus txib yog siv los teeb tsa tus qauv ntsuas. Ua ntej kev sib txuas, module tuaj yeem ua haujlwm raws li AT hais kom ua. Tom qab kev sib txuas, nws nkag mus rau hauv qhov chaw nres nkoj serial pob tshab kis tau tus mob hom.
Lub sijhawm pib ntawm cov qauv no yog li 150ms. Yog li nws zoo dua los ua haujlwm AT cov lus txib tom qab tau siv rau 200ms. Tshwj tsis yog lwm qhov qhia, qhov ntsuas qhov ntsuas ntawm AT hais kom ua tau zoo tam sim ntawd. Nyob rau tib lub sijhawm, kev hloov pauv ntawm cov kev ntsuas thiab kev ua haujlwm yuav tsis ploj ib zaug thaum fais fab tuag.
Tom qab ua tiav kev hloov kho ntawm AT cov lus txib, nws zoo ib yam rov qab rau OK (Tsuas yog cov ntaub ntawv tshawb xyuas cov lus txib xws li "AT+RX, AT+VERSION"). Tsis muaj kev vam meej ua tiav, nws yuav tsis rov qab rau cov ntaub ntawv.
⑴ AT Command List
AT hais kom ua |
Muaj nuj nqi |
Default |
Lub luag hauj lwm |
|
("X"- qhov ntsuas) |
||||
1 | AT | Kuaj cov lus txib | - | M/S |
2 | AT+RX | Txheeb xyuas qhov tsis yooj yim | - | M/S |
3 | AT+DEFAULT | Rov qab teeb tsa lub Hoobkas | - | M/S |
4 | AT+RESET | Pib dua lub module | - | M/S |
5 | AT+VERSION | Txheeb xyuas version thiab hnub tim | - | M/S |
6 | AT+ROLE = x | Hloov tus tswv/qhev lub luag haujlwm | S | M/S |
7 | AT+NAME = xxxxxxxxxxxxx | Hloov lub npe | HC-08 | M/S |
8 | AT+ADDR = xxxxxxxxxxxxx | Kho qhov chaw nyob | Kho vajtse | M/S |
chaw nyob | ||||
9 | AT+RFPM = x | Tshawb xyuas lub zog RF | 0 (4dBm) Cov | M/S |
10 | AT+BAUD = x, y | Txheeb xyuas UART baud | 9600, ib | M/S |
11 | AT+CONT = x | Teeb kev sib txuas | 0 (Ua tau | M/S |
txuas nrog) | ||||
12 | AT+MODE = x | Teeb hom ua haujlwm | 0 | S |
13 | AT+AVDA = xxxxxxxxxxxxx | Hloov cov ntaub ntawv tshaj tawm | - | S |
14 | AT+TIME = x | Hom 3 lub voj voog tshaj tawm | 5 (tus) | S |
Tus tswv module kom pom tseeb | ||||
15 | AT+CLEAR | qhev module chaw nyob | - | M |
tau kaw tseg. |
Nco tseg:
1. AT cov lus txib tom qab tsis muaj kab ntawv tshiab; yog tias tsis muaj cov lus qhia tshwj xeeb, tag nrho AT cov lus txib tsis raug xa mus siv kab tshiab.
2. Qhov kawg 4 cov lus txib laus, yuav tsum siv ua ke, tuaj yeem ua nws lub luag haujlwm BLE Bluetooth lub zog qis. Siv Bluetooth tsis muaj zog, yuav muaj cov lus qhia tshwj xeeb thiab cov phiaj xwm tau qhia hauv ntu hauv qab no.
Kauj Ruam 6: Hais Kom Piav
1. Qhov kev hais kom ua
Hais kom ua: AT
Rov qab los: OK.
Txheeb xyuas qhov tsis yooj yim
Saib qhov tsis yooj yim xws li Bluetooth lub npe, tus tswv/qhev lub luag haujlwm, UART baud tus nqi, chaw nyob thiab tus lej zais.
Hais kom ua: AT+RX
Rov qab los:
Lub Npe: HC-08 ------ >>> bluetooth npe
Txoj Haujlwm: Qhev ------ >>> tus tswv/qhev lub luag haujlwm
Baud: 9600, TSIS MUAJ ------ >>> UART baud tus nqi
Addr: xx, xx, xx, xx, xx, xx ------ >>> bluetooth chaw nyob
PIN: 000000 ------ >>> bluetooth lo lus zais
Nco tseg: Ib ntus tsis txhawb hloov tus password!
-
Pib dua rau lub neej ntawd
Hais kom ua: AT+DEFAULT
Rov qab los: OK
Tus qauv yuav rov pib dua, thov ua haujlwm tshiab ntawm kev rov pib dua 200ms!
-
Pib dua lub module
Hais kom ua: AT+ RESET
Rov qab los: OK
Tus qauv yuav rov pib dua, thov ua haujlwm tshiab ntawm kev rov pib dua 200ms!
5. Che xyuas version thiab hnub tim
Hais kom ua: AT+ VERSION
Rov qab los: HC-08V2.0, 2014-08-22
6. Hloov tus tswv/qhev lub luag haujlwm teeb tsa
hais kom ua: AT+ROLE = x Lus nug
hais kom ua: AT+ROLE =? X: lub luag haujlwm (M lossis S), M: tus tswv; S: qhev. Kev teeb tsa tsis raug yog S (qhev).
Xa: AT+ROLE = M.
Rov qab los: OK
Teeb tus tswv lub luag haujlwm, tus qauv yuav rov pib dua!
Xa: AT+ROLE =?
Rov qab los: Tswv
Koj tuaj yeem pom lub luag haujlwm yog tus qauv tswv.
-
Hloov lub npe
Teeb hais kom ua: AT+ NAME = xxxxxxxxxxxx
Cov lus nug nug: AT+ NAME =?
Lub npe tsis raug yog HC-08, koj tuaj yeem teev lwm lub npe (Siv tau hauv 12 tus cim, txhawb kev pom ASCII tus lej thiab ib feem ntawm tus yam ntxwv khiav tawm. Tus qauv txhawb nqa Suav, tab sis cov cuab yeej hauv xov tooj yuav tsum hloov mus rau "UTF8 code" txhawm rau Ntau tshaj 12 tus cim, tom qab ntawd nws yuav nyeem thawj 12 tus cim nkaus xwb.) Kev teeb tsa tiav, siv tau tom qab kev hloov kho tau pib dua!
Piv txwv:
Xa: AT+NAME = HCKJ
Rov qab los: OKsetNAME
Xa: AT+NAME =?
Rov qab los: HCKJ
8. Rov xyuas qhov chaw nyob
Teeb hais kom ua: AT+ADDR = xxxxxxxxxxxx
Cov lus nug nug: AT+ADDR =?
Qhov chaw nyob yuav tsum yog 12 ntsis "0 ~ F" cov ntawv loj, uas yog cov cim hexadecimal.
Piv txwv:
Xa: AT+ADDR = 1234567890AB
Rov qab los: OKsetADDR
Kev teeb tsa tiav, siv tau tom qab kev hloov kho tau pib dua!
Xa: AT+ADDR =?
Rov qab: 1234567890 AB
Xa: AT+ADDR = 000000000000
Rov qab los: OKsetADDR
Xa "000000000", tus qauv los kho qhov chaw nyob kho vajtse qub. Module factory default yog hardware address.
9. Rov xyuas RF lub zog
Teeb hais kom ua: AT+RFPM = x
Cov lus nug nug: AT+RFPM =?
X: RF zog, raws li qhia hauv cov lus hauv qab no:
Parameter
RF zog
? Saib lub zog RF tam sim no 0 4dBm (default) 1 0dBm ib 2 -6dBm 3 -23dBm Piv txwv:
Xa: AT+RFPM = 2
Rov qab los: OK
RF fais fab hloov -6dBm.
Xa: AT+RFPM =?
Rov qab: -6dBm
RF zog yog -6dBm.
Thaum lub ncov tam sim no ntau dua 30mA (thaum RF lub zog yog 4dBm) thiab tam sim no ntawm cov roj teeb khawm me me (qis dua 20mA), yog tias peb xav kom them nrog lub roj teeb khawm, peb yuav zoo dua teeb tsa RF zog ua -6dBm lossis -23dBm.
10. Revise UART baud tus nqi
Teeb hais kom ua:
AT+BAUD = x (Tsuas yog hloov kho UART baud tus nqi)
AT+BAUD = x, y (Hloov kho UART baud tus nqi thiab sib luag me ntsis)
Cov lus nug nug: AT+BAUD =?
x: UART baud tus nqi, y: parity ntsis, Raws li qhia hauv cov lus hauv qab no:
Parameter UART baud: x
Parameter
sib pt: y
? Saib tus nqi baud tam sim no 1200 1200 Ib N Tsis muaj kev ncaj ncees 2400 2400 Ib E Txawm sib npaug 4800 4800 Ib O Qhov txawv parity 9600 9600bps (default) 19200 19200 Ib 38400 38400 Ib 57600 57600 Ib 115200 115200bps Piv txwv:
Xa: AT+BAUD = 19200
Rov qab los: OK19200
UART baud tus nqi hloov pauv rau 19200bps.
Xa: AT+BAUD = 4800, E.
Rov qab los: OK4800, XWB
UART baud tus nqi hloov pauv rau 4800bps, thiab txawm tias sib npaug.
Xa: AT+BAUD =?
Rov qab los: 4800, YOG
Saib UART baud tus nqi thiab sib luag me ntsis.
Thaum tus tswv thiab qhev tus qauv hloov pauv, txhua pob ntawv hauv qab 9600bps baud tus nqi yuav tsum tsis pub ntau tshaj 500 bytes. Raws li rau txhua pob ntawv nrog baud tus nqi siab dua 19200bps, thov xa mus rau cov lus hauv qab no. Nruab nrab ntawm cov ntaub ntawv ntim, nws yuav tsum muaj qee lub sijhawm luv. Cov lus hauv qab no yog ntau yam kev sib txuas lus baud tus nqi, tus nqi siv rau lub sijhawm luv:
baud tus nqi (bps) 1200 2400 4800 9600 19200 38400 57600 115200 500 bytes sij hawm luv (ms) 6800 3600 2000 1000 300 bytes sij hawm luv (ms) 4200 2400 1200 600 400 100 bytes sij hawm luv (ms) 1500 800 400 160 100 120 80 bytes sij hawm luv (ms) 1000 650 320 120 80 60 100 60 bytes sij hawm luv (ms) 800 500 250 100 60 60 60 100 20 bytes sij hawm luv (ms) 200 100 50 20 20 20 20 20 1. Qhov saum toj no yog ntsuas cov ntaub ntawv. Theoretical ceev tshaj tag nrho transceiver ceev: 2500 bytes/sec, nrog rau kev tswj ceev hauv 2000 bytes/sec.
2. Bytes ntawm txhua pob ntawv yuav tsum yog tus lej sib npaug ntawm 20.
3. Module xa cov ntaub ntawv cog lus sib cog lus tsis siv neeg yog cov lej sib npaug ntawm 20 bytes. Nws tau siv los xa pob 100 bytes, thiab nws yuav tau txais ntau pob ntawv ntawm lwm qhov kawg. Txhua pob ntawv cov ntaub ntawv yog cov lej sib npaug ntawm 20 bytes. Tag nrho cov naj npawb ntawm bytes yog 100.
11. Set txuas tau
Teeb cov lus txib: AT+CONT = x
Cov lus nug nug: AT+CONT =?
X parameter ua haujlwm yog raws li hauv qab no:
Parameter Tus Xib Hwb Qhev Role Nruab Nrab Ib puag ncig 0 Yuav txuas tau, kev txuas Yuav txuas tau, kev txuas (Default) tom qab nkag mus rau pob tshab zoo tib yam tom qab nkag mus zoo ib yam pob tshab hom kev sib kis hom kev sib kis Tus Saib Xyuas Tshaj tawm Lub module tsis tuaj yeem txuas nrog Tsis txuas nrog tus tswv lub luag haujlwm, 1 rau lwm yam khoom siv, tab sis yuav pib- tab sis tuaj yeem ua ke nrog lub zog qis ua lej luam theej duab HC-08 los ntawm hom 3, kev paub txog kev tshaj tawm tshaj tawm hauv xov datamachine pob, pob ntawv xa. tsau 2sec sijhawm kho tshiab. Piv txwv:
Xa: AT+CONT = 1
Rov qab los: OK
Kev teeb tsa tiav, siv tau tom qab kev hloov kho tau pib dua!
Xa: AT+CONT =?
Rov qab los: Tsis txuas tau
Cov lus txib thov nrog "AT+MODE", "AT+AVDA" thiab "AT+TIME" hais kom ua nrog kev siv.
Nco tseg:
1. Tus tswv/qhev tus qauv "CONT = 1" feem ntau yog siv rau xa cov ntaub ntawv tshaj tawm. Xa cov ntaub ntawv tshaj tawm los ntawm tus qhev tus qauv, tus qauv tswv yuav tau txais cov ntaub ntawv sib xws los ntawm cov ntawv tso tawm.
2. Cov qauv no yog rau cov neeg siv kom rub cov pob ntawv tshaj tawm no los ntawm nws tus kheej nkaus xwb. Cov txheej txheem kev sib txuas lus tshwj xeeb tsis tau piav qhia ntawm no. Yog tias koj xav paub, thov mus ntsib lub vev xaib raug cai hauv qab no rau kev sab laj:
www.hc01.com/
Kauj Ruam 7: 12. Set Hom Ua Haujlwm (Tsuas Qhua Module)
Teeb hais kom ua: AT+MODE = x
Cov lus nug nug: AT+MODE =?
Hais kom ua | Parameter | Rov qab los | Muaj nuj nqi |
=? | 0/1/2/3 | Tau txais hom tam sim no. | |
=0 | Tag nrho lub zog hom (lub neej ntawd), LED qhib. | ||
Qib 1 lub zog txuag hom, LED kaw. | |||
=1 | Tsis muaj kev sib txuas tam sim no yog 340μA, kev sib txuas | ||
ceev zoo li hom0. | |||
Qib 2 lub zog txuag hom, LED kaw. | |||
=2 | Tsis muaj kev sib txuas tam sim no yog 0.4μA. | ||
UA+ | Nrhiav tsis tau, tsis txuas nrog kom sawv | ||
QAUV | OK | ua ntej, tom qab tsaug zog tuaj yeem txuas nrog. | |
Qib 3 lub zog txuag hom, LED kaw. | |||
Tsis muaj kev sib txuas tam sim no yog 1.2μA ~ 160μA (txog | |||
32μ Ib qho default |
|||
=3 | Ua ke nrog "AT+TIME" los teeb tsa kev tshaj tawm | ||
sijhawm, yog li txhawm rau txo hwj chim. | |||
Kev siv cov txheej txheem tshwj xeeb thov saib mus rau | |||
"AT+TIME" hais kom ua. |
Nco tseg:
-
Hom 3 feem ntau yog siv rau:
A. Siv los txo hwj chim.
B. Tus qhev module xa cov ntaub ntawv tshaj tawm mus rau tus tswv tswv, tuaj yeem ua tiav kev sib txuas lus ib txoj hauv kev ntawm ib rau ntau tus (raws li nws tuaj yeem yog los ntawm tus qhev module mus rau qhov tsis paub tus tswv).
C. Raws li kev tiv thaiv poob ceeb toom, daim npav tuaj koom, ntsuas lub plawv ntsuas lossis lwm yam khoom siv wireless.
2. Hom 1/2/3 muaj los ntawm UART chaw nres nkoj kom xa 1 byte cov ntaub ntawv kom sawv, tab sis pem hauv ntej ob peb bytes ntawm cov ntaub ntawv tuaj yeem ua rau tsis zoo tom qab sawv. Yog li ntawd peb pom zoo kom xa 10 bytes hexadecimal code ntawm "0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF" kom ua kom pom qhov hloov pauv, zam rau pem hauv ntej ob peb cov ntaub ntawv byte tej zaum yuav tsis meej pem. Txij thaum ntawd los, cov qauv ua haujlwm ntawm hom nrawm, UART chaw nres nkoj tuaj yeem ua tau ib txwm xa thiab tau txais cov ntaub ntawv.
Nyob rau hauv qhov xwm txheej tsis txuas nrog, tom qab tau tsim los rau hauv hom nrawm, uas tswj tau li 5 feeb, thiab tom qab ntawd rov qab mus rau hom qub. Ntev li 5 feeb hauv UART tau txais cov ntaub ntawv, tom qab ntawd rov ua dua.
Yog hais tias tus qauv nyob hauv lub xeev txuas nrog, tom qab ua kom tsaug zog, nws yuav nyob twj ywm hauv hom nrawm. Ua ntej kev sib txuas, tus qauv yuav rov ua lub zog qub qub.
3. Ntxiv rau hom0, lwm hom yog kaw LED. Tab sis tom qab txuas, LED yuav pom kev.
Piv txwv: Xa: AT+MODE =?
Rov qab: 0
Saib hom tam sim no.
Xa: AT+MODE = 2
Rov qab los: OK
Teeb hom 2, siv tau tam sim ntawd.
-
Hloov cov ntaub ntawv tshaj tawm (Tsuas yog tus qauv qhev)
Hais kom ua: AT+AVDA = xxxxxxxxxxxx
Parameter "xxxxxxxxxxxx" tuaj yeem yog 1 ~ 12 bytes cov neeg siv cov ntaub ntawv. Yog tias nyob ntawm qhov no
tus tswv xeev lub xeev ntawm AT+CONT = 1, tom qab ntawd tus tswv module UART chaw nres nkoj yuav tso tawm cov ntaub ntawv "xxxxxxxxxxxx". Cov ntaub ntawv tshaj tawm yuav tsis raug khaws cia tas mus li. Nws yuav raug tshem tawm tom qab rov pib dua.
Piv txwv:
Qhib lub luag haujlwm xa: AT+AVDA = 1234567890AB
Rov qab los: OK
Yog tias ntawm qhov no tus tswv xeev lub xeev ntawm AT+CONT = 1, UART chaw nres nkoj yuav tso tawm: 12345 67890AB.
14. Muaj 3 lub voj voog tshaj tawm (Tsuas yog qhev)
Teeb cov lus txib: AT+TIME = x
Cov lus nug nug: AT+TIME =?
Parameter x teeb tsa ntau yog raws li hauv qab no:
x kev 1 2 3 4 5 6 7 8 9 A B C D E F sij hawm/ 1 2 3 4 5 6 7 8 9 10 20 30 40 50 60 sec (lub neej ntawd) x kev F G H Kuv J K sij hawm/ 1 2 5 10 30 60 min Piv txwv:
Xa: AT+TIME = F
Rov qab los: OK
Teeb hom 3 ntawm kev tshaj tawm xov xwm rau 60 vib nas this. Txhua 60 vib nas this, xa cov ntaub ntawv tshaj tawm.
Xa: AT+SIJHAWM =?
Rov qab: 60s
Kev daws teeb meem tsawg zog (qhev module):
1. Qhov xav tau kom sawv ntawm wireless:
Nkag mus rau "AT+MODE = 1" lossis "AT+MODE = 3", tus qauv yuav nkag mus rau lub zog qis kom txog thaum tus tswv module thov txuas. Tom qab kev sib txuas, tam sim no yog 1.6mA. Cov ntaub ntawv sib pauv hloov pauv yuav nkag mus rau hom nrawm ua ntej txuas nrog, thaum tom qab txuas nrog, nws yuav rov qab mus rau hom qis zog.
2. Muaj peev xwm txuas qhov xwm txheej:
Sau "AT+MODE = 2", nws yuav nkag mus rau lub zog siv hom tsawg2. Tus qauv nkag mus rau lub xeev pw tsaug zog. Nws tsis tuaj yeem pom los ntawm tus tswv tswv. Thaum koj txuas, koj tuaj yeem xa cov ntaub ntawv xav tau los tsim cov qauv, thiab tom qab ntawd nws tuaj yeem xa thiab tau txais cov ntaub ntawv ib zaug txuas nrog.
Kev daws teeb meem qis tshaj tawm hauv xov tooj cua hom:
Thawj teeb tsa lub luag haujlwm tseem ceeb: AT+CONT = 1 -> AT+ROLE = M.
Thiab tom qab ntawd teeb tsa lub luag haujlwm qhev: AT+CONT = 1 -> AT+AVDA = 1234 ≦ ≦ 12Bytes cov ntaub ntawv)
Cov neeg siv 'MCU xa 10 bytes hexadecimal code ntawm "0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF" mus rau qhov qauv ntawm UART chaw nres nkoj txhawm rau txhawm rau hloov lub module mus rau hauv lub zog puv hom. Txij ntawm no, cov neeg siv tuaj yeem tsim nyog tsim nyog raws li lawv xav tau. Qhov saum toj no "AT+CONT = 1, AT+AVDA = xxxx, AT+MODE = 3, AT+TIME = 5" tau teeb tsa rau: "tshaj tawm thiab txuas tsis tau". Cov ntaub ntawv tshaj tawm yog XXXX, hom 3 (lub sijhawm 5 vib nas this). Raws li cov lus saum toj no, qhov nruab nrab tam sim no tsawg dua 4 μA, SIJHAWM yuav ntau dua 1 feeb. Ntev dua lub sijhawm no, qis zog siv nws yuav muaj.
Tus neeg siv xav xa cov ntaub ntawv nquag, thov kom nkag mus rau hom 2 nyob rau lub sijhawm tsis ua haujlwm, xav tau xa cov ntaub ntawv hloov mus rau hom sib xws.
15. Tus tswv qauv los tshem tawm tus qhev qhov chaw nyob tau sau tseg (Tsuas yog tus tswv)
Teeb hais kom ua: AT+CLEAR
Cov lus nug nug: OK
Tus tswv tswv, ib zaug txuas nrog tus qauv qhev, yuav nco txog MAC chaw nyob ntawm tus qhev module hauv lub sijhawm kawg. Yog tias koj xav txuas nws mus rau lwm tus qauv qhev, koj yuav tsum tshem tawm lub cim xeeb tam sim no. Thawj txoj hauv kev yog tso tus qauv 18 tus pin rau qib hluav taws xob siab ntawm 200ms, lwm txoj hauv kev yog siv "AT+CLEAR" hais kom ua.
Kauj Ruam 8: Siv Schematic
Kauj ruam 9: Qhov chaw
Kab lus no yog los ntawm:
Yog tias koj muaj lus nug, koj tuaj yeem tiv toj : [email protected].
Pom zoo:
Yuav Ntsuas Li Cas Ntsuas Kev Siv Lub Hwj Chim ntawm Kev Sib Txuas Lus Wireless hauv Era ntawm Kev Siv Hluav Taws Xob?: 6 Cov Kauj Ruam
Yuav Ua Li Cas Ntsuas Kom Tau Txais Kev Siv Lub Hwj Huam ntawm Kev Sib Txuas Lus Wireless hauv Era ntawm Kev Siv Hluav Taws Xob? Feem ntau IoT nodes yuav tsum tau siv lub roj teeb. Tsuas yog los ntawm kev ntsuas ntsuas lub zog siv ntawm lub wireless wireless peb tuaj yeem kwv yees kwv yees ntau npaum li cas roj teeb kuv
Arduino Neeg Hlau Nrog Kev Nyob, Kev Qhia thiab Qib Kev Sib Hloov (Sab Hnub Poob, Sab Hnub Poob, Sab Qaum Teb, Sab Qab Teb) Tswj los ntawm Lub Suab Siv Bluetooth Module thiab Kev Siv Tus Neeg Siv Hluav Taws Xob: 6 Kauj Ruam
Arduino Neeg Hlau Nrog Kev Nyob, Kev Qhia thiab Qib Kev Sib Hloov (Sab Hnub Poob, Sab Hnub Poob, Sab Qaum Teb, Sab Qab Teb) Tswj los ntawm Lub Suab Siv Bluetooth Module thiab Kev Siv Tus Neeg Siv Hluav Taws Xob: Cov lus qhia no piav qhia yuav ua li cas thiaj tsim tau Arduino Robot uas tuaj yeem txav mus raws qhov xav tau (Forward, Backward) , Sab laug, Txoj Cai, Sab Hnub Poob, Sab Hnub Poob, Sab Qaum Teb, Sab Qab Teb) xav tau Kev nrug deb hauv Centimeters siv lub suab hais kom ua. Neeg hlau kuj tseem tuaj yeem txav tau tus kheej
Kev Sib Txuas Txuas Txuas Txuas Siv Bluefruit: 4 Cov Kauj Ruam
Kev Sib Txuas Tsis Sib Txuas Siv Bluefruit: Nov yog cov lus qhia yooj yim los ntawm kauj ruam qhia los hloov koj cov xov hlau nrog bluetooth tsis muaj zog txuas: Nws coj kuv ib pliag los daws qhov no vim tias tsis muaj cov ntaub ntawv hais txog kev ua qhov no nrog bluetooth niaj hnub tsis muaj zog thev naus laus zis raws li Bluefrui
EZ Kev Sib Txuas Txuas Txuas Txuas Ntxiv - Tsis Muaj Tus Kheej! (CSRC-311): 7 Kauj Ruam
EZ Kev Sib Txuas Txuas Txuas Txuas Ntxiv - Tsis Muaj Tus Kheej! (CSRC-311): Tsis ntev dhau los ntawm Azamom.com (thov txim, tam sim no tau muag tawm) Kuv tau hla qhov kev pom zoo zoo ntawm Common Sense RC CSRC-311 tus qauv-siv servos.Noj zoo, Kuv xav hloov qee yam ntawm tsis tu ncua kev sib hloov. Txoj kev kuv tuaj nrog yog yooj yim heev thiab xav tau
Cov lus qhia rau Ua Plaub Qhov Kev Txuas Txuas Txuas Rau Qhov Chaw Mounted Footrest: 9 Cov Kauj Ruam (nrog Duab)
Cov lus qhia rau Ua Plaub Qhov Kev Txuas Txuas Txuas Rau Lub Hauv Paus Mounted Footrest: Mid-drive fais fab log lub rooj zaum (PWC) tau dhau los ua neeg nyiam nyob rau xyoo tas los no. Txawm li cas los xij, vim qhov kev tso rau pem hauv ntej casters, cov tsoos sab-mounted footrests tau hloov los ntawm ib qho chaw nruab nrab-footrest. Hmoov tsis zoo, center-mou