You are on page 1of 8
Mach thu phat MKE-M15 Bluetooth 3.0 SPP / BLE 4.2 Dual Mode module Contents Gidi thigu Théng so ky thuat nh AT Commands Kich thuéc Cae chan tin higu Huong dan st dung voi phan mém Arduino va Vietduino + MakerEdu Shield for Vietduino Phan ctrng can chuan bi Phan mém can chuan bj Chuong trinh mau: So dd két néi Cac bude tién hanh: Két qua: Huéng dan st dung voi phan mém mBlock va MakerEdu Creator Phan etmng cn chuan bi Phan mém can chuan bi Chuong trinh mau: So dé két néi: Cac buée tién hanh: Két qua: Nha phan phéi Gidi thiéu MKE-M15 Bluetooth 3.0 SPP / 8 Mode module 2 Dual Mach thu phat MKE-M15 Bluetooth 3.0 SPP / BLE 4.2 Dual Mode module dugc str dung dé truyén nhan dé ligu qua Bluetooth vdi cdc May Tinh, Bién Thoai Smart Phone hé trg Bluetooth 3.0 SPP va BLE 4.2, & ché 46 Bluetooth 3.0 SPP mach cé tl Bluetooth HC-05/HC-06 véi dé tuong thich gan nhu hoan toan (cé thé thay thé ma khéng can chinh stra code), véi BLE 4.2 mach cé thé két néi véi hau hét céc Smartphone méi nhat hién nay str dung hé digu hanh Android / 10S nhu: Iphone, Ipad,..., mach sir dung chuan giao tiép UART, hé tro b6 tap lénh AT Commands rat dé dang dé két ndi va str dung. urge str dung dé thay thé cdc mach Mach thu phét MKE-M15 Bluetooth 3.0 SPP / BLE 4.2 Dual Mode module thudc hé sinh thai phn cting co dign tir MakerEDU (https://wiki.makerlab.vn/index.php/Main_Page) nén cé thé sir dung tryc tigp an toan véi cdc board mach giao tiép & cd hai mifc dién 4p 3.3VDC va SVDC nhu: Arduino, Raspberry Pi, Jetson Nano, Microtbit,....voi chudn két néi Connector XH2.54 théng dung. anh bao: Xin nap (upload) chwong trinh truréc khi két ndi mach vao Arduino/Vietduino dé chac chan rang cac chan giao tiép da dugc cau hinh ding! & Thong sé ky thuat = Module Bluetooth str dung: JDY-33 = Dign ap hoat déng: SVDC = Dién dp giao tiép: TTL 3.3VDC/SVDC. = Chuan giao tiép: Digital UART = Baudrate Default: 9600, N, 8, 1 = 6 tro cdu hinh qua bé tp Iénh AT Commands. = Chuan két néi Bluetooth: Bluetooth 3.0 SPP va BLE 4.2 (tuong thich May Tinh, Bién Thoai Smart Phone hé tro Bluetooth 2.0 / 3.0 va 4.0) = Tan sé sng: 2.4Ghz = Khodnng cdch truyén nhdn t6i da: 30m = Twong thich hé diéu hanh: Windows / Android / |OS = Thuéc hé sinh thai phan ct¢ng co’ dién tir MakerEDU (https://wiki.makerlab.vn/index.php/Main_Pa ge) nén cé thé sir dung true tiép an toan voi cdc board mach giao tiép & ca hai mic dién Ap 3.3VDC va 5VDC nhu: Arduino, Raspberry Pi, Jetson Nano, Microvbit.... = BO sung thém cac thiét ké dn dinh, chéng nhiéu. = Chuan két néi: Conector XH2.54 4Pins = Tuong thich tét nhdt khi str dung véi cdc mach MakerEDU Shield. B6 tap 1énh AT Commands Néu muén thay déi cdc thiét lp mac dinh (thuéng khéng cn thié), ban cé thé str dung bé tap \énh cu hinh AT Commands dé cau hinh lai cho Mach thu phat MKE-M15 Bluetooth 3.0 SPP / BLE 4.2 Dual Mode module, tuy nhién vigc nay cn str dung thém mach chuyén USB-UART hoac lap trinh qua Arduino, xin Iu y thiét lp dung Baudrate Default: 9600, N, 8, 1 va sau cdc lénh AT can thém \An: Command Instruction Default far Test 2 AT+VERSION Version Number JDY-33-V1.1 3 | avestat Connection Status 0 4 | ATWSLEEP Sleep - 5 | atesavp UART Baudrate Setting 9600 6 | ateaue Name Setting IDY=83-SPP 7 | atsave BLE Name Setting IDY=33-BLE 8 ATPIN Pin Setting (password) 9 AT+LADDR MAC Address Setting 10 | aTereser Soft Reset ‘ u | areperaut Default Setting - 12 AT#DISC Disconnect - 13. | ATHYPE Pairing Password Switch Setting 0 14 | AT+ENLOG Status Log Enable L 15 | aT+uUIDLEN Set the length of UUID ° 16 | ar+svewvip BLE Service UUID Setting FFEO 17 | arecuruerp BLE Feature UUID Setting FFEL is | arvcrneurp BLE Feature UUID Setting FFE 19 | AT+UARTHODE UART Parity Bit Setting No Parity 20 | aT+stTs STAT Pin Function Setting 0 Mach thu phat MKE-M15 Bluetooth 3.0 SPP - BLE 4.2 Dual Mode module AT Commands Kich thuéc MKE-M16 Bluetooth 3.0 SPP / BLE 4.2 Dual Mode module Cac chan tin hiéu MKEM15 Ghi cha GND Chan cp ngudn am OVDC 5V ‘Chan cp nguén dong SVDC ™ ‘Chan truyén tin higu UART Transmitter RX CChan nh@n tin higu UART Receiver Hung dan sit dung véi phan mém Arduino va Vietduino + MakerEdu Shield for Vietduino MKE-M15 Bluetooth 3.0 SPP / BLE 4.2 D Mode module back Phan ctrng can chuan = Mach thu phat MKE-M15 Bluetooth 3.0 SPP / BLE 4.2 Dual Mode module = Mach Vietduino Uno (Arduino Uno Compatible) = Mach Arduino MakerEDU Shield = Cap USB dé nap chuong trinh va cp nguén Luu y: Néu khéng ¢6 mach Vietduino Uno ban van cé thé str dung mach Vietduino Mega 2560, Arduino Uno, Arduino Mega 2560 hoac cdc mach phan cirng cé cu triic cdc chan GPIO tuong ty. Phan mém can chuan bj: = Tai va cai dat phan m&m Arduino theo huéng dan. = Tai va cai dat Driver, cu hinh cho mach Vietduino Uno trén phan mém Arduino theo huéng dan. = Tai va cai dat bé thu vién Dabble (https://github.com/makerlabyn/mke-m15-bluetooth-dabble-mod ule-lib) (str dung App Dabble diéu khién bo Arduino qua Bluetooth) theo hudng dan. Chwong trinh mau: 17 Then bp thy vien GonePad oabote 17 add the Ganerad Dabble Library, tideFine CUSTOM ftdeFine INCLUDE_GAMEPAD_MODULE ‘tinelude 11 hon chin cv Ninh cho m8-dun Bluetooth. 17 Select the configuration pin for the Bluetooth modute. ‘define Tx PIN 12 fideFine RXPIN 13 vold set 1 Khoi dng KEt né& Serial UART 4 t&e a6 9600 aE truyin di Liu Lén may tinh 1 Start the Serial UART connection at 9568 to transfer data to the conputer. Serial.begin(962e); 1 Kv8% dong thy vign va edu hiinh ede chan KEE nBt, 1 Start the Library and configure the pins Dabble.negin(215200, RK.PIN, TX_PIN). > void Lo0pC) a * wom nay due st dung a€ Lam aot av Ligu thu duge tu aign thogt thang minh * bo dd, vige got hom nay 12 bdt buse dé nhin di Lieu ehinh xde tw aien thogt at ang cia ben 7 abble.processinput() 1 Teayen t2n nit bain tir B1gn thogt Len mdy eka. 1 Transfer button names from phone to computer GF (GamePad. isUpPressed()) * serdat.pr ? 4 (GamePad. isdownPressed()) "UP"; ow") 4 (Ganepad.1s e3()) Leprintln(*LEFT"); AF (GamePad. LeRightPrese * Seriat.printIn(*RIGHT"); 1 Chis 8,052 aot his tra Lot 1 Wait 8,055 to check again So dé két néi: ArduinolVietduino Devices Port 012,13 Mach Thu Phat MKE-M15 Bluetooth 3,0 SPP / BLE 4.2 Dual Mode Module Cac buéc tién hanh: 1, Két ndi mach Vietduino Uno véi mach MakerEDU Shield for Vietduino. 2. Két ndi Mach Thu Phat Bluetooth MKE-M15 voi mach MakerEDU Shied for Vietduino qua Port 012,13 3. Két néi mach Vietduino Uno véi may tinh bang cap USB va cdu hinh mach trén phan mam Arduino (Board / Port). 4. Nap chong trinh mau vao mach Vietduino Uno. 5. Nhan nut Reset trén mach Vietduino Uno hoac mach MakerEDU Shield for Vietduino dé bat dau chay chuong trinh Két qua: epic Hung dan sit dung véi phan mém mBlock va MakerEdu Creator Phan cing can chuan bj: = Mach thu phat MKE-M15 Bluetooth 3.0 SPP / BLE 4.2 Dual Mode module = Mach hién thi MKE-M07 LCD1602 12C module = Mach MakerEdu Creator = Cap USB dé nap chuong trinh va c4p nguén Phan mém can chuan bi: = Tai va cai dat phan mém mBlock theo huéng dan. = Tai va cai dat Driver, cdu hinh cho Mach MakerEdu Creator trén phan mém mBlock theo huéng dan. = Tai va cai dat Extension MakerEdu Hardware trén phan mém Mblock theo huéng dan. Chwong trinh mau: Sau khi ban 4a md app Dabble, vao giao dién Control va két néi Bluetooth thanh céng. Méi khi ban bam cdc nut mGi tén hudng trén dién thoai, tin higu sé dugc gtri vé mach MakerEdu Creator qua Bluetooth. Mach MakerEdu Creator sé cho hién thi tén nut nhan tuong Ung, gdm UP/DOWN/LEFT/RIGHT 1én man hinh LCD. Blocks © 07/08 LCD 12C | Clear all >) M15 Bluetooth Dabble UART| Is t¥ pressed on GamePad © 07/08 Lc 12c | Print QB at column 1 Ere Coa }} M15 Bluetooth Dabble UART|Is | ¥ pressed on GamePad: Eiaee a and Row 1 Pred act Ear orm Link Code mBlock: Example Code. So dé két ndi: MakerEdu Creator Devices Port UART Mach Thu Phat MKE-M15 Bluetooth 3.0 SPP / BLE 4.2 Dual Mode Module Port 12C Mach Hién Thi MKE-MO7 LCD 1602 12C Module Cac buéc tién hanh: 41, Két néi Mach Thu Phat Bluetooth MKE-M15 véi mach MakerEdu Creator qua Port UART. 2. Két néi Mach Hién Thi MKE-MO7 voi mach MakerEdu Creator qua Port I2C. 3. Két néi mach MakerEdu Creator voi may tinh bang cép USB va cu hinh mach trén phan mém mBlock. 4, Nap chong trinh mau vao mach MakerEdu Creator. 5, Nhn nuit Reset trén mach MakerEdu Creator dé bat dau chay chong trinh. Két qua: pic Nha phan phéi Cé thé mua Mach thu phat MKE-M15 Bluetooth 3.0 SPP / BLE 4.2 Dual Mode module tai cac nha phan phdi sau: = Hshop.vn - Bign tl & Robot. (https://hshop. vn/products/mach-thu-phat-mkl-m15-bluetooth-3-0-sp p-ble~4-2-dual-mode-module) Retrieved from ‘hitps://wiki. makerlab.vn/index php?title=Mach_thy_phat_MKE- M15_Bluetooth 3.0 SPP_/ BLE 4.2 Dual Mode _module&oldid=3256 This page was last modified on 3 March 2023, at 03:11.

You might also like