BLE Motor is a kind of motor driver board compatible with Arduino UNO. It has integrated BLE Bluetooth 4.0 module, MEGA328 main control and L298P motor driver, which can be used to drive one-channel stepping motor or two-channel DC motor. Benefit to the sensor port on BLE Motor, we can plug in all kinds of Octopus brick sensors directly. At the same time, it can support various Shield extension for it has Arduino Shield compatible connector. A BLE Motor equals the combination of “Arduino UNO + BLE module + Sensor Shield + L298P MOTOR Shield”. We have integrated all these modules together to avoid messy cabling and the instability it caused while the size is well-controlled. The integrated BLE 4.0 enables us to connect mobile more easily. It is a convenient development board for robotics and intelligent cars.
4. Details about Partial Pins & Connectors:
a. Logic level switch:
When switched to 5V end, the footer operate voltage level of BLE MOTOR is 5V, which is the same with GVS red power supply port. Similarly, when we choose 3.3V, both BLE motor footeroperatevoltage and GVS red power supply port voltage is 3.3V. Therefore, we can connect 3.3V sensor directly without any voltage level transformation. It is more convenient to use.
b. GPIO0-GPIO13:Digital port D0-D13. V in GVS stands for VCC, G for GND, S for signal. GVS is standard sensor port which enables us to connect steering engine and all kinds of sensors easily. At the same time, it can support all of Octopus Bricks products.
c. GPIO14-GPIO20:Analog pin A0-A6. GVS port can connect steering engine and all kinds of sensors easily. It supports all of Octopus Bricks products.
d. Motor Control Switch Option Footer
Two connection methods in total. Different connections have different motor control methods. After disconnected, it can be used as common IO port.
Note: The silk mark on main board is wrong. And the right mark should be 4-M1, 5-E1, 6-E2, 7-M2.
1. Key Function Introduction:
1. DC Motor Drive Function:
PWM Function for speed control: analogWrite(pin, value)
1.pin: the pin to write to.
Under DC motor control, it represents motor speed control pin.
2.value: the duty cycle: between 0 (always off) and 255 (always on).
Under DC control, it represents speed value. 0 is for minimum speed(stop) and 255 for maximum speed.
Direction control uses digital pin operate function: digitalWrite(pin, value)
pin: the pin number
Under DC motor control, it represents the motor's corresponding pins in control end.
value: HIGH or LOW，
HIGH is for motor positive rotation, LOW is for motor negative rotation.
The code below can realize motor positive rotation in full speed.
int E1 = 5; //Define D5 as M1 speed control pin
int M1 = 4; //Define D4 as M1 direction control pin
analogWrite (E1, 255); // M1 full speed rotation
digitalWrite(M1, HIGH); // M1 positive rotation
2.Wireless Communication Function:
Set baud rate:
1. Installation of operate environment and drive:
Based on Arduino UNO design, the usage of BLE Motor is as simple as Arduino UNO. It supports Arduino IDE programming and burning software. You don't have to install any drives so that it can work properly.
1. Like the following picture showed: Plug into USB, we will see serial port number in computer device manager. (Com number will differentiate according to the practical situation.)
2. Open the sample code we provided and choose Arduino UNO, then we can start programming and software burning.
1. DC Motor connection:
1. Search on Google Application Market or APP Store: BLE CENTER, download and install "BLE Center App", then you can connect BLE MOTOR with mobile to realize remote control:
2. Burn the sample code we provided and connect DC motor according to the instruction.
3. Open BLECenter App. When we hear the vocal message of "connected", then we have connected it successfully. Enter Console interface:
4. Use mobile Bluetooth to send "0" to "BLE MOTOR". Motor 1 will rotate positively at first, then negatively, and stop in the end. Next, motor 2 will repeat the movement of motor 1.
5. When test is finished, it will return "0". This shows everything is ok.
6. Press the button, we can see key value "SWX OK" on mobile.
4． Relative Parts:
Things we have to pay attention:
If you need more information, please log on: http://www.elecfreaks.com .