BTSmartFan Servo/DC motor controlled using Bluetooth
Fork of BTSmartFan_WIZwiki-W7500 by
Prerequisite
This example is to control a servo motor and DC motor using bluetooth.
To implement this function, you need a Platform board, Easy Module Shield V1, Bluetooth module, DC jack, 5V DC Power Supply.
Below are what we used.
- WIZwiki-W7500 from WIZnet (Platform board)
- Arduino Motor Shield
- Easy Module Shield(Not mandatory)
- HC-05 bluetooth module
- Servo motor(DM-S0300D)
- DC motor(5V)
- DC jack
- 5V DC Power Supply
Hardware Configuration
WIZwiki-W7500 Pin map
Arduino Motor Shield + DC motor(5V) + DC jack + 5V DC Power Supply
Easy Module Shield(Not mandatory) + HC-05 bluetooth module + Servo motor(DM-S0300D)
Software
BlueTerm (Application)
download a BlueTerm App to send a command message to bluetooth module with smart phone.
Pins setting
main.cpp
Serial pc(USBTX, USBRX); Serial bt(PA_14, PA_13); Servo myservo(D14); PwmOut Motor(D3); DigitalOut direction(D12);
Baud rate
main.cpp
pc.baud(115200); //bt.baud(115200); bt.baud(9600);
Diff: main.cpp
- Revision:
- 1:1ad093d2a110
- Parent:
- 0:7441087c2a16
- Child:
- 3:1751a2ebf652
--- a/main.cpp Mon Jun 29 01:27:03 2015 +0000 +++ b/main.cpp Wed Apr 12 04:34:03 2017 +0000 @@ -33,7 +33,8 @@ { char ch; pc.baud(115200); - bt.baud(115200); + //bt.baud(115200); + bt.baud(9600); pc.printf("Hello World!\n\r"); bt.printf("Hello World!\r\n");