Cov txheej txheem:

Teeb tsa Bluetooth HC-05 Nrog Arduino: 5 Kauj Ruam
Teeb tsa Bluetooth HC-05 Nrog Arduino: 5 Kauj Ruam

Video: Teeb tsa Bluetooth HC-05 Nrog Arduino: 5 Kauj Ruam

Video: Teeb tsa Bluetooth HC-05 Nrog Arduino: 5 Kauj Ruam
Video: Светодиодный контроллер Arduino Bluetooth с Bluetooth-модулем Android HC-05 | Разработчик прилож MIT 2024, Lub Xya hli ntuj
Anonim
Teeb tsa Bluetooth HC-05 Nrog Arduino
Teeb tsa Bluetooth HC-05 Nrog Arduino

Hauv txoj haujlwm no, peb yuav ntiav HC05 Bluetooth module nrog Arduino xa xov los ntawm smartphone mus rau Arduino chav tsev thiab tso tawm ntawm lub computer.

Txog HC-05 Bluetooth module:

HC-05 module yog ib qho yooj yim siv Bluetooth SPP (Serial Port Protocol) module, tsim los rau pob tshab wireless txuas txuas txuas teeb tsa. Serial chaw nres nkoj Bluetooth module tau ua tiav Bluetooth V2.0+EDR (Txhim Kho Cov Ntaub Ntawv Tus Nqi) 3Mbps Kev Hloov Kho nrog ua tiav 2.4GHz xov tooj cua transceiver thiab baseband. Nws siv CSR Bluecore 04-Sab nraud ib leeg nti Bluetooth tshuab nrog CMOS thev naus laus zis thiab nrog AFH (Kev Hloov Kho Zaus Dua Dhau Qhov Tshwj Xeeb). Nws muaj hneev taw me me li 12.7mmx27mm. Vam tias nws yuav yooj yim rau koj qhov kev tsim qauv/kev txhim kho mus los.

Kauj Ruam 1: Tus Pin Configuration thiab Function:

Nqe lus piav qhia

Xeev - Kom paub lub xeev kev sib txuas. (Paired los yog disconnected)

Rx - Tau Txais Tus Pin ntawm tus qauv kom tau txais Cov Ntaub Ntawv.

Tx - Xa tus Pin ntawm tus qauv rau xa cov ntaub ntawv.

5v - Tus pin zog

GND - Tus pin hauv av

EN/Qhov tseem ceeb - Pab lossis lov tes taw tus qauv.

Kauj Ruam 2: Cov Cheeb Tsam Yuav Tsum Tau:

- Pawg tswj hwm Arduino 1

- HC05 Bluetooth module 1

- Jumper xov hlau 6

- Daim ntawv qhia zaub mov 1

Koj tuaj yeem yuav cov khoom no, uas yog TESTED rau qhov zoo, los ntawm elegocart.

Kauj Ruam 3: Teeb tsa Txoj Haujlwm:

Teeb Project
Teeb Project

Kauj ruam 4: Code:

#suav nrog SoftwareSerial EEBlue (10, 11); // RX | UA TX void setup () {Serial.begin (9600); EEBlue.begin (9600); // Default Baud rau comm, nws yuav txawv rau koj li Module. Serial.println ("Lub qhov rooj bluetooth tau qhib. / N Txuas mus rau HC-05 los ntawm lwm yam khoom siv bluetooth nrog 1234 ua tus yuam sij ua ke!"); } void loop () {// Pub cov ntaub ntawv los ntawm bluetooth rau Terminal. yog (EEBlue.available ()) Serial.write (EEBlue.read ()); // Pub tag nrho cov ntaub ntawv los ntawm lub sijhawm mus rau bluetooth yog (Serial.available ()) EEBlue.write (Serial.read ()); }

Kauj ruam 5: Android App:

Ntawm Play Store muaj ntau cov apps txuas rau Bluetooth module HC05 rau lub xov tooj Android, koj tuaj yeem siv ib qho ntawm lawv. Kuv siv Bluetooth Terminal app.

Pom zoo: