Cov txheej txheem:

Kev Sib Txuas Txuas Txuas Txuas Siv Bluefruit: 4 Cov Kauj Ruam
Kev Sib Txuas Txuas Txuas Txuas Siv Bluefruit: 4 Cov Kauj Ruam

Video: Kev Sib Txuas Txuas Txuas Txuas Siv Bluefruit: 4 Cov Kauj Ruam

Video: Kev Sib Txuas Txuas Txuas Txuas Siv Bluefruit: 4 Cov Kauj Ruam
Video: Plab Plab Ntswg..(Pluav Pluav Ntswg) Maiv Twm New Song 2023-2024 2024, Kaum ib hlis
Anonim
Kev Sib Txuas Txuas Txuas Txuas Siv Bluefruit
Kev Sib Txuas Txuas Txuas 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 nrog:

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 xws li Bluefruit module. Kuv lub hom phiaj yog kom muaj peev xwm khaws cov ntaub ntawv tau nrawm los ntawm kev ntsuas nrawm txuas nrog Arduino, cov ntaub ntawv raug kaw ntawm kuv lub laptop lossis kuv lub xov tooj smartphone rau kev tshuaj xyuas.

Kauj ruam ib: rub cov program los nyeem UART

Mac - Kuv tab tom siv Adafruit Bluefruit LE Txuas, nws yog pub dawb ntawm App Store thiab sau tseg hauv kab ntawv blog no:

blog.adafruit.com/2016/06/06/bluefruit-le-…

IOS / Android - Kuv siv tib Bluefruit LE Txuas software tab sis yooj yim dua IOS version, kos rau App Store

Windows - Muaj qhov haujlwm zoo nyob rau ntawm GitHub ntawm no:

github.com/adafruit/adafruit-bluefruit-le-…

Kauj Ruam 1: Txuas Koj Li Bluefruit Module

Txuas Koj Qhov Bluefruit Module
Txuas Koj Qhov Bluefruit Module

Nov yog daim duab kab xev yooj yim, Adafruit cov tsev qiv ntawv mob tau txuas rau ib yam nkaus hauv cov kauj ruam tom ntej yog teeb tsa rau qhov teeb tsa txuas no yog li kuv pom zoo tsis hloov nws. Kuv tau siv qhov no nrog Arduino Uno thiab Pro Mini thiab lawv yeej tseem ua haujlwm zoo ib yam.

Kauj Ruam 2: Teeb IDE rau Bluefruit

Teeb IDE rau Bluefruit
Teeb IDE rau Bluefruit
Teeb IDE rau Bluefruit
Teeb IDE rau Bluefruit

Yog tias koj tseem tsis tau muaj, koj yuav tsum rub tawm ob peb lub tsev qiv ntawv los siv thaum tsim cov qauv, ntawm no lawv yog:

learn.adafruit.com/introducing-the-adafrui…

Yog tias koj tsis paub yuav teeb tsa lub tsev qiv ntawv nws yooj yim npaum li cas tsuas yog qhib cov ntawv thiab muab tso rau hauv koj cov ntaub ntawv/Arduino/Libraries nplaub tshev thiab rov pib dua IDE.

Kauj Ruam 3: Sau thiab Tshaj Tawm Koj Txoj Haujlwm

Nov yog qhov haujlwm luv Kuv tau sau ntawv uas xa cov lus hla bluetooth rau cov khoom siv tau txais los saib, qhov tseem ceeb tshaj plaws yog qhov koj teev koj tus lej RX / TX tus lej raws li thiab ntxiv lwm kab txuas ua ke.

#suav nrog

const int rxpin = 10;

const int txpin = 9;

SoftwareSerial Serial1 (rxpin, txpin);

void teeb (tsis muaj dab tsi) {

Serial.begin (9600); // qhov no yog qhov txuas txuas txuas ib txwm txuas nrog uas koj tuaj yeem pom nrog Arduino IDE

Serial1.begin (9600); // qhov no hauv txoj hlua thib ob uas xa mus rau Bluefruit module, nws yuav tsum yog 9600 baud

}

void voj () {

Serial.println ("MyNameJeff");

Serial1.println ("MyNameJeff");

ncua (1000); // qhov no luam tawm hauv ob qho chaw yog li koj yuav tsum pom cov lus tseem ceeb heev no ib yam nkaus

}

Kauj ruam 4: Koj Ua Tau

Koj Ua Tau!
Koj Ua Tau!

Vam tias tam sim no koj tab tom saib UART qhov tshwj xeeb hauv koj daim ntawv thov xaiv thiab txaus siab nrog cov lus nws muab rau koj, koj yuav tsum pom qee yam zoo li cov duab no nyob ntawm no, yog tias tsis tau sim rov txuas koj lub Circuit Court lossis lub Hoobkas rov pib dua koj lub module los tuav GND tus pin rau tus pin DFU rau 5 vib nas this kom txog thaum lub teeb xiav thiab liab liab nyem.

Pom zoo: