Cov txheej txheem:

Bluetooth ntawm Arduino -a Coj: 7 Kauj Ruam
Bluetooth ntawm Arduino -a Coj: 7 Kauj Ruam

Video: Bluetooth ntawm Arduino -a Coj: 7 Kauj Ruam

Video: Bluetooth ntawm Arduino -a Coj: 7 Kauj Ruam
Video: Skalensimulationen auf einem Internetradio mit ESP32 und einem kleinen SPI-Display 2024, Lub Xya hli ntuj
Anonim
Bluetooth ntawm Arduino -a Coj
Bluetooth ntawm Arduino -a Coj
Bluetooth ntawm Arduino -a Coj
Bluetooth ntawm Arduino -a Coj

Hnub no, kuv yuav piav qhia koj yuav siv bluetooth module HC05 lossis HC06 yooj yim heev. Peb tsuas yog mus kawm cov hauv paus, nrog rau/tawm cov khoom (cov ntawm cov koob digital).

Kuv yuav zaum ua Tus Qhia Ntawv txog cov khoom sib piv (tus pin A…), thaum kawg kuv yuav txiav txim siab yuav ua li cas, kom ua tiav qhov no.

Kauj Ruam 1: Koj Xav Tau Dab Tsi?

Koj Xav Tau Dab Tsi?
Koj Xav Tau Dab Tsi?

Txhawm rau ua tiav txoj haujlwm no, koj yuav xav tau:

  • 1 Arduino UAS
  • Hlau
  • 1 Ledas
  • 1 tus tiv thaiv (220 ohm)
  • 1 bluetooth module (HC05 lossis HC06, Kuv yuav piav qhia qhov txawv tom qab)
  • 1 khob cij
  • 1 lub computer
  • USB cable ntawm arduino
  • lub xov tooj smartphone nrog Android app "bluetooth RC controller" muaj nyob ntawm PlayStore

Kuv tsis paub yog tias lub app muaj nyob ntawm AppStore, tab sis koj tuaj yeem tshawb nrhiav nws. Yog tias tsis yog, mus rau kauj ruam kawg.

Kauj ruam 2: Circuit Court

Qhov Circuit
Qhov Circuit
Qhov Circuit
Qhov Circuit

Yog tias koj paub lub app zoo lossis lub vev xaib los tsim daim duab arduino, kuv tos koj hauv cov lus!

Yog li kuv tsis pom ib qho (tsis muaj lub bluetooth module ntawm tinkercad), Kuv tsuas yog ua cov duab zoo nkauj tshwj xeeb tshaj yog rau koj!

Lub bluetooth module:

  • RXD -pin 10
  • TXD -pin 11
  • GND thiab GND
  • VCC → 3.3V

Coj:

  • Ntev ceg -tus pin 9
  • Cov ceg luv -breadboard hauv av nrog tus tiv thaiv

Tsuas yog siv daim duab los tsim lub Circuit Court.

Kauj ruam 3: App

Lub App
Lub App
Lub App
Lub App

Ua ntej tshaj, rub tawm lub app "bluetooth rc controller". Yeej, thaum koj nias ib lub pob, nws yuav xa ib tsab ntawv mus rau arduino. Koj tuaj yeem tshawb xyuas cov tsiaj ntawv hauv qhov chaw. Muaj qhov ntsuas qhov ntsuas qhov ntsuas, tab sis peb yuav tsis siv nws.

Kauj Ruam 4: Txoj Haujlwm

Txoj Haujlwm
Txoj Haujlwm

Txoj haujlwm yog daim tseem ceeb kom nkag siab tias bluetooth ua haujlwm li cas.

Koj yuav pom txhua qhov kev piav qhia ncaj qha ntawm qhov program, uas koj tuaj yeem pom ntawm daim duab tab sis kuj koom nrog.

Yog tias koj muaj lus nug tsis txhob ua siab deb nug lawv hauv cov lus!

Kauj Ruam 5: Txuas App thiab Arduino

Txuas App thiab Arduino
Txuas App thiab Arduino

Txhawm rau txuas lub bluetooth module thiab lub xov tooj ntawm tes, mus rau hauv app, nyem lub pob teeb tsa thiab nyem "txuas rau lub tsheb". Tom qab ntawv nyem rau HC05 (lossis HC06 yog tias koj siv HC06). Liab coj ntawm bluetooth module yuav tsum tam sim no ntsais muag 2 zaug, tom qab ntawd khoob, tom qab ntawd 2 zaug, thiab lwm yam. Lub pob liab liab ntawm lub app yuav tsum tig ntsuab.

Thawj zaug koj txuas tus qauv, nws yuav nug tus password. Thawj lo lus zais yog 1234.

Kauj Ruam 6: Xeem

Xeem
Xeem
Xeem
Xeem
Xeem
Xeem
Xeem
Xeem

Tam sim no koj tau txuas lub bluetooth thiab tso qhov program hauv daim npav, koj tuaj yeem sim nws. Tsuas yog nias lub pob kom hloov ntawm cov coj thiab khawm qis kom hloov ntawm cov coj.

Kauj Ruam 7: Kauj Ruam Ntxiv rau Cov Uas Tsis Muaj App

Yog tias koj tsis siv lub xov tooj Android, tej zaum koj tsis tuaj yeem rub tawm lub app.

Koj tuaj yeem siv lwm lub app. Tshawb nrhiav bluetooth arduino app thiab txheeb xyuas seb nws puas ua haujlwm raws li lub app kuv tab tom siv. Nws yuav zaum tsis xa tib cov lus yog li sim ua kom paub cov lus nws xa thaum koj nias txhua lub pob. Txhawm rau ua qhov no, koj tuaj yeem mus rau hauv cov chaw app lossis sim txhua lub pob nrog lub ntsuas saib. Yog tias koj tsis paub yuav sau cov lus li cas hauv cov ntawv saib, tsuas yog nug hauv cov lus.

Koj tseem tuaj yeem tsim koj tus kheej app siv AppInventor los ntawm MIT. Kuv yeej tsis tau siv nws, Kuv tsuas paub tias muaj ob ntu, ib qho rau tus tsim thiab ib qho rau qhov program. Koj yuav tau tshawb fawb los ntawm koj tus kheej seb nws ua haujlwm li cas, thov txim.

Pom zoo: