Cov txheej txheem:

Bluetooth Tswj Tsev Automation: 7 Kauj Ruam (nrog Duab)
Bluetooth Tswj Tsev Automation: 7 Kauj Ruam (nrog Duab)

Video: Bluetooth Tswj Tsev Automation: 7 Kauj Ruam (nrog Duab)

Video: Bluetooth Tswj Tsev Automation: 7 Kauj Ruam (nrog Duab)
Video: wifi пульт для IR и RF кодов Broadlink RM4C Pro, работа в Home Assistant - управляем кондиционером 2024, Kaum ib hlis
Anonim
Image
Image

Nyob zoo,

Txoj haujlwm no yog txhua yam hais txog kev tsim cov cuab yeej siv tsev yooj yim tshaj plaws uas siv arduino thiab bluetooth module. Qhov no yog qhov yooj yim heev los tsim thiab nws tuaj yeem tsim nyob hauv ob peb teev. Hauv kuv cov ntawv uas kuv tau piav qhia ntawm no, kuv tuaj yeem tswj tau txog 4 yam khoom siv hauv tsev siv kuv lub xov tooj Android. Cia peb saib cov npe khoom thiab cov cuab yeej uas koj xav tau.

Kauj Ruam 1: YUAV TSUM MUAJ NTAUB NTAWV

NTAWV YUAV TSUM MUAJ
NTAWV YUAV TSUM MUAJ
NTAWV YUAV TSUM MUAJ
NTAWV YUAV TSUM MUAJ
NTAWV YUAV TSUM MUAJ
NTAWV YUAV TSUM MUAJ

Cov neeg, ntawm no yog cov npe khoom siv uas koj xav tau rau kev ua txoj haujlwm yooj yim no.

  1. Arduino ib
  2. 4-chhanel relay module
  3. Bluetooth module (Hc-05)
  4. Jumper hlau
  5. ntoo ciam teb
  6. Qij tuav
  7. xaim
  8. 5v Fais fab mov

Cov Npe Ntawm Cov Cuab Yeej

  1. Cov khoom siv Soldering
  2. Phom phom
  3. Android Smartphone
  4. Ntsia Hlau
  5. Hlau strippers thiab lwm yam:

Qhov ntawd yog txhua yam peb xav tau …

Kauj Ruam 2: Daim Duab Circuit Court thiab Kev Sib Txuas

Daim duab Circuit Court thiab Kev Sib Txuas
Daim duab Circuit Court thiab Kev Sib Txuas

Txuas circute belove stap

Kauj Ruam 1. arduino txuas rau bluetooth module hc-05

Kauj Ruam 2. hc-05 vcc thiab gnd txuas rau arduino vcc 3.5v thiab gnd

Kauj Ruam 3. hc-05 rx thiab tx txuas rau arduino sequencely tx thiab rx (0 thiab 1)

Kauj Ruam 4. 4-channel relay module muaj 6 tus pin vcc, gnd, 1-4 relay hloov

Kauj ruam 5. relay module txuas arduino vcc gnd thiab tus pin arduino 2-5

NCO TSEG:- Hauv daim duab Bluetooth txuas yog Wong Bluetooth module Rx thiab Tx txuas nrog ntu arduino Tx thiab Rx (0 thiab 1) tus lej pin

Kauj ruam 3: Software

Lub Software
Lub Software
Lub Software
Lub Software
Lub Software
Lub Software

peb tab tom siv software arduino hauv pograming inarduino uno

Rub tawm Arduino IDE los ntawm no.

Kauj ruam 4: Txoj Cai

Txoj cai no siv softwareserial.h los teeb tsa rx thiab tx pins hauv Arduino. Cov rx thiab tx pins no txuas nrog tx thiab rx pins ntawm HC 05 Bluetooth module feem.

Lub bluetooth module tau txais cov ntaub ntawv los ntawm cov khoom siv hauv Android uas ua ke thiab ua rau muaj kev sib txuas nrog kev hwm rau cov ntaub ntawv tau txais. Piv txwv li, hauv kuv tus lej yog tias cov ntaub ntawv tau txais yog tus cim "A", kev xa tawm 1 yuav ua rau ON thiab yog tias cov ntaub ntawv tau txais yog tus ua cim "B", kev xa tawm 1 yuav raug kaw. Ib yam li txhua qhov kev xa tawm tuaj yeem tig ON/OFF siv cov lus txib bluetooth. Xa cov cai rau cov lus ntxaws ntxaws.

Kauj ruam 5: Android Daim Ntawv Thov

Android Daim Ntawv Thov
Android Daim Ntawv Thov

download Android app ntawm no

Raws li tau hais los saud, tus tswj hwm micro ua rau txhua qhov xa tawm raws li cov ntaub ntawv nws tau txais los ntawm Bluetooth Module los ntawm Android ntaus ntawv. Yog li peb xav tau Android daim ntawv thov xa cov ntaub ntawv no mus rau HC 05. Kuv tau ua daim ntawv thov tshwj xeeb siv MIT App tus tsim khoom. Kuv tau txuas qhov 'block layout' ntawm kuv daim ntawv thov ua PDF ntawm no rau kev siv rau cov uas yuav ua lawv tus kheej app siv App Inventor.

Kauj Ruam 6: Cov lus qhia rau Android App

Cov lus qhia rau Android App
Cov lus qhia rau Android App
Cov lus qhia rau Android App
Cov lus qhia rau Android App
Cov lus qhia rau Android App
Cov lus qhia rau Android App

Koj yuav tsum ua khub HC-05 Bluetooth module rau koj lub cuab yeej Android ua ntej koj tuaj yeem siv nws hauv app.

Kauj Ruam 1: Qhib koj lub cuab yeej teeb tsa bluetooth thiab tshawb nrhiav cov cuab yeej tshiab, xyuas kom cov coj ntawm HC05 module ntsais muag tas li (Hom Pairing)

Kauj Ruam 2: Xaiv HC 05 (lossis koj yuav pom qhov chaw nyob xaus nrog "C" raws li qhia hauv daim duab.)

Kauj ruam 3: Ntaus tus PIN "1234" thiab nias OK

Kauj Ruam 4: Qhib "Bluetooth Controller" app thiab nyem lub pob bluetooth nyob rau sab saum toj ntawm lub vijtsam

Kauj ruam 5: Xaiv "HC 05" los ntawm cov npe

Kauj Ruam 6: Siv cov hloov pauv kom tig rau/OFF cov xa tawm 1, 2, 3, 4

Kauj Ruam 7: Nyem tus Xib Hwb kom tig tag nrho cov kev xa tawm ON/OFF hauv ib zaug

Kauj Ruam 7: Sib sau ua ke

Sib sau ua ke
Sib sau ua ke
Sib sau ua ke
Sib sau ua ke

Kev sib sau ua ke txhua feem ntawm daim duab

Pom zoo: