查看“Connection Method for Old Version”的源代码
←
Connection Method for Old Version
跳转至:
导航
、
搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
===[[Connection Method for Old Version]]=== {| style="width: 800px;" |- | *You need to use AT instruction to set up some parameters via the serial port. So you can refer to the following module handbook: [[File:Bluetooth40 en.pdf]] *Module Needed {|class="wikitable" |- |Related Hardware||Number||Function |- |Microduino-BT||2||For communication connection |- |Microduino-USBTTL||1||For serial port communication debugging |- |Dupont line ||4||For circuit connection |- |USB cable ||2||For power supply |- |} *We must set one module as the master machine and another as the slave machine. The master machine will search the requirement of the slave machine and then match them. When we start to build the hardware and connect Microduino-BT and Microduino-USBTTL, we need to connect four wires: {|class="wikitable" |- |Microduino-BT||Microduino-USBTTL |- |RX0||TX1 |- |TX1||RX0 |- |3V3 ||3V3 |- |GND ||GND |- |} [[File:BT-USBTTL-1.jpg|600px|center|thumb]] [[File:BT-USBTTL-2.jpg|600px|center|thumb]] *'''Slave Machine Parameter Configuration: **Build the circuit according to the schematic and supply the power through USB cable; **Open Arduino editor, choose the right COM port, open the serial port debugging, or you can use other Com debug assistant. **First, choose the serial port baud rate as 9600 , set the mode as “No line terminator”. Click “send” or “enter” after inputting “AT” in the serial port data sending box, you’ll receive “OK” at the data receiving end, meaning your BT module can be set via AT instruction. Notice: If there is no return value, you need to change the baud rate to 115200. It is probably the unmatched baud rate that leads to failed communication. Baud rate setup can refer to the module handbook above. **Check and set a BT module under slave mode(The default is the slave mode): ***Click “send” or “enter” after inputting “AT+ROLE” in the serial port sending box, you can set it under the slave mode if it returns as “OK+Get0” and under the host mode if it returns as “OK+Get1”. So, you need to set the slave mode via “AT+ROLE0” instruction. **Check the work type of the slave machine--“Power to work instantly”. ***Click “send” or “enter” after inputting “AT+IMME?” in the serial port data sending box, you can know that “Power to work instantly” if it returns as “OK=Get1”. Otherwise, you need to set it as “Power to work instantly” mode via “AT+IMME?” instruction. After finishing configuring the slave machine parameter, you just need to get it powered. *'''Master Machine Parameter Configuration:''' **Check and set another BT module to be under the master machine mode: ***Click “send” or “enter” after inputting “AT+ROLE?” in the serial port data sending box. If it returns to be “OK+Get0”, then it is under the slave mode. You need to set it under the host mode through “AT+ROLE1” instruction. Generally, by this time you can get your Bluetooth connected. The host machine will search the slave devices and connect them automatically. **If it fails to connect, please check whether the work type of the host machine is “Power to wait ” (Default). ***Click “send” or “enter” after inputting “AT+IMME?” in the serial port data sending box. If it returns to be “OK+ Get1, then it is under the mode of “Power to work instantly”. So, you need to set it under the mode of “Power to wait” through “AT+IMME0” instruction. **If it still can’t connect under the mode of “Power to wait”, it is probably the host machine has connected other Bluetooth devices.(Since it will try to connect the preserved slave devices instantly, this may lead to disconnection with the existing devices.) So, you can use “AT+CLEAR” to clear the originally stored connection information. In this way, it can enter the search state and search once again for device and then connect. **If it still can not be connected, you can try to connect devices in the fixed Bluetooth MAC address **Connect Microduino-USBTTL with the slave machine, configure the host machine, check MAC address of the slave machine and save the address. ***Click “send” or “enter” after inputting “AT+ADDR?” in the serial port data sending box. If it returns to be address “OK+ADDR:MAC(XXX)”, please don’t forget the address since the host machine needs to make connection through the address. After configuring the slave parameter, the only thing you need is to get it charged. ***Connect Microduino-USBTTL and the host machine, configure the host machine, set the work type of the host--”Power to work instantly”. ***Just input “AT+CONXXX” in the serial port data sending box. “XXX” is the MAC address you keep in mind. Then, click “send” or “enter”. If it returns to be “OK”, it means a successful connection and you can see two Bluetooth indicators don’t blink. It it can’t connect to the fixed devices, it’ll enter the state of search and at this time, you can try “AT+RESET” to restart the module and reconnect. **After it is connected, if you cut off the device, you can’t reconnect it once again. You need to restart the serial monitor, set the work type of the host machine--”Power to wait”. Thus, you can get it connected every time it gets powered off. |}
返回至
Connection Method for Old Version
。
导航菜单
个人工具
创建账户
登录
名字空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
Welcome
首页
创客大赛
大赛详情
3D打印
安装月球车
图形化编程
操控月球车
升级月球车
编程工具下载
软件下载
Arduino
Processing
Mixly
Scratch
模块套件
Microduino 102
mCookie 102
mCookie 202
mCookie 302
IBC
其他
应用套件
四轴飞行器
平衡车
小车CUBE
音乐播放器
刷卡音乐播放器
wifi气象站
彩虹音乐触摸灯
分贝检测仪
迎门汇报
LED点阵时钟
LED点阵屏幕
硬件
mCookie
Sensor
Microduino
MicroWrt
MicroNux
MicroRobot-Core
MicroRobot-CoreESP
ideaBoard
ideaBox
MicroMV
MicroAI
帮助
常见问题
帮助
工具
链入页面
相关更改
特殊页面
页面信息