Cov txheej txheem:

Arduino thiab Txawb Kev Sib Txuas Bluetooth (tus xa xov): 8 Kauj Ruam
Arduino thiab Txawb Kev Sib Txuas Bluetooth (tus xa xov): 8 Kauj Ruam

Video: Arduino thiab Txawb Kev Sib Txuas Bluetooth (tus xa xov): 8 Kauj Ruam

Video: Arduino thiab Txawb Kev Sib Txuas Bluetooth (tus xa xov): 8 Kauj Ruam
Video: Table Soccer || Kev lom zem. ຄວາມມັນຫຼັງຈາກເລີກວຽກ 2024, Lub Xya hli ntuj
Anonim
Arduino thiab Txawb Kev Sib Txuas Bluetooth (tus xa xov)
Arduino thiab Txawb Kev Sib Txuas Bluetooth (tus xa xov)
Arduino thiab Txawb Kev Sib Txuas Bluetooth (tus xa xov)
Arduino thiab Txawb Kev Sib Txuas Bluetooth (tus xa xov)
Arduino thiab Txawb Kev Sib Txuas Bluetooth (tus xa xov)
Arduino thiab Txawb Kev Sib Txuas Bluetooth (tus xa xov)

Kev sib txuas lus yog qhov tseem ceeb hauv peb lub neej niaj hnub. Tab sis lub sijhawm no ntawm kev kaw kev sib txuas lus nrog peb tsev neeg lossis kev sib txuas lus nrog tib neeg hauv peb lub tsev qee zaum xav tau xov tooj ntawm tes. Tab sis kev siv xov tooj ntawm tes rau kev sib txuas lus luv luv tsuas yog siv nyiaj ntau xwb. Yog li qhov no yog kuv tus kheej Arduino txoj haujlwm siv Bluetooth module sib tham los ntawm xov tooj mus rau Arduino, los ntawm Arduino rau xov tooj, zoo li tus xa xov Bluetooth. Cia peb pib:)

Khoom siv

Yam xav tau:

  • Arduino nano / UNO / MEGA.
  • Bluetooth module hc - 05.
  • Android ntaus ntawv.
  • jumper hlau nos.4 (poj niam rau poj niam)
  • Android app (txuas muab)

Kauj Ruam 1: Video Siv

Image
Image

Pls saib daim vis dis aus no kom pom meej ntawm kuv qhov project

Like share thiab subscribe kuv channel rau ntau txoj haujlwm.

Kauj ruam 2: Kev sib txuas

Arduino Txoj Cai
Arduino Txoj Cai

Bluetooth >> Arduino

  • vcc / 5v+ >> 5v
  • gnd >> gn cov
  • RX >> D4
  • TX3> D3

Kauj Ruam 3: Arduino Code

Coding yog qhov tseem ceeb tshaj plaws hauv Arduino.

*Code tsis raug hloov lossis thov. chaws yog kuv*

Cov cai tuaj yeem rub tawm hauv Arduino IDE.

Txoj cai tuaj yeem rub tawm ntawm no:

#suav nrog SoftwareSerial bt (3, 4); int LED = 2; Txoj hlua btdata; Txoj hlua serialdata; teeb tsa tsis muaj dab tsi () {Serial.begin (9600); bt.begin (9600); Serial.println ("Tos rau bluetooth txuas.."); } void loop () {yog (bt.available ()! = 0) {btdata = bt.readString (); Serial.println (btdata); } yog (Serial.available ()! = 0) {serialdata = Serial.readString (); bt.print (serialdata); Serial.print (""); Serial.print (serialdata); }}

Kauj ruam 4: Bluetooth Android App

Bluetooth Hauv App
Bluetooth Hauv App

Hauv app yog ib qho tseem ceeb heev rau kev sib txuas lus ntawm Arduino. Qhov tshwj xeeb tau teeb tsa hauv Android app Kuv yuav piav qhia nws hauv qab no. Kuv tau tsim ib qho android app siv MIT app tus tsim khoom (txiav tawm yooj yim los tsim). Kuv tau muab qhov rub tawm txuas hauv qab no:

Kauj ruam 5: Txuas Android thiab Arduino

Txuas Android thiab Arduino
Txuas Android thiab Arduino
Txuas Android thiab Arduino
Txuas Android thiab Arduino
Txuas Android thiab Arduino
Txuas Android thiab Arduino
Txuas Android thiab Arduino
Txuas Android thiab Arduino
  • txuas Arduino rau lub khoos phis tawj thiab qhib Serial monitor.
  • Qhib bluetooth hauv koj lub cuab yeej Android.
  • Qhib bluetooth teeb tsa thiab txuas lub cuab yeej hu ua HC-05, tus password (1234 lossis 0000).
  • Qhib lub hauv app.
  • Nyem rau Bluetooth khawm thiab xaiv hc-05
  • tam sim no Android tau ua khub nrog Bluetooth module.

Kauj Ruam 6: Video Txuas

Cov vis dis aus no qhia meej txog kuv qhov project thov saib https://houtu.be/VcL8ADuc2yE Saib cov vis dis aus hauv youtube.

Kauj Ruam 7: Yuav Sib Tham Li Cas?

Yuav Sib Tham Li Cas?
Yuav Sib Tham Li Cas?
Yuav Sib Tham Li Cas?
Yuav Sib Tham Li Cas?
Yuav Sib Tham Li Cas?
Yuav Sib Tham Li Cas?
  • Tom qab txuas rau Bluetooth, ntaus koj cov ntawv hauv kab ntawv.
  • Qhib Serial monitor hauv pc.
  • Ntaus ib yam dab tsi hauv lub thawv ntawv thiab nkag mus xa, koj tuaj yeem pom tias cov ntawv nkag los ntawm koj yuav raug nthuav tawm hauv Serial monitor.
  • Ntaus ib yam dab tsi ntawm Serial monitor thiab nias nkag mus, koj tuaj yeem saib cov ntawv hauv Android app.
  • Lub khawm lub suab hais kom siv los ntawm Android, cov lus hais hauv nws tau hloov pauv mus rau hauv cov ntawv thiab xa mus rau Serial monitor.
  • Lub suab lub pob tau siv los nyeem cov ntawv xa los ntawm Arduino nrov nrov (Cov ntawv nyob ntev li ob peb feeb).
  • Yog xav tau koj tuaj yeem hloov Serial monitor nrog LCD zaub module.

Pom zoo: