Article Directory
Phone control Raspberry Pi
Preparatory
Environment:
Raspberry Pi System Version: 2017-07-05-Raspbian-jessie.img
installation wiringPi library: Tutorial Address
IOS App: go your
Android App: You go (GOBLE_V2.apk)
Code: Download
Bluetooth module: Baud Rate: 115200 , UUID: 0xDFB0 , CHAR: 0xDFB1
(let the seller to configure the time of purchase)
Connection and configuration:
raspberry pie | Bluetooth |
---|---|
BCM15 (RT) | TX |
BCM14 (TX) | RX |
Enable Raspberry Pi serial Tutorial: Raspberry Pi serial communication ultra-detailed 3B
Compile and run the code
下载代码上传到树莓派,进入代码所在文件夹
$ g++ -Wall main.cpp GoBLE.cpp GoBLE.h -o ble -lwiringPi
$ ./ble
Bluetooth pairing
Bluetooth phone is turned on, you go to open the APP (automatic connection raspberry pie), see the red light turns green indicates that Bluetooth is connected to
the next, they are free to play up.
You can adapt your project as a controller.
to sum up
Because Raspberry Pi comes with a Bluetooth connection is not successful so use a external Bluetooth module, the next hope can be used for on-board Bluetooth.
DFrobot from open source projects: http://wiki.dfrobot.com.cn/index.php/ pirate ship kit phone remote control Advanced Tutorial _