Introduction:
In our projects is common to use DC motors in robotics, conveyor belts, in drones, among many other Arduino projects and we want to make a test of DC motor speed control from mobile App using an application created in AppInventor and will make a serial communication via a BlueTooth module HC-06 compatible with Arduino.
Steps and materials for DC Motor speed Control from mobile App
The materials for this simple circuit implementation are:
1. Small DC motor that works between 5v and 9v
2 A Bluetooth Module HC-05 or HC-06
3 A transistor BC549
4 Resistance of 100 ohms
5 Diode IN4007
6. Development board Arduino Mega or  Aruino UnoR3
7 Cell Phone with Android Operating System
8 Adapter for Arduino board
It is important to note that how you will control a DC motor, the power required may be greater than that provided by the USB port and therefore it is necessary to use an additional adapter for the Arduino board.
The connection of the motor circuit to Arduino is:
This circuit enables us to control the current passing through the motor using the PWM signal coming from Arduino board, and as the pulse width varies on 9 pin of Arduino board, the base current of the transistor varies too, so the current that flows from the emitter to the collector is directly controlled by the PWM, and this causes that the motor speed increases or decreases as the current flowing from the emitter to the collector of the transistor, in addition to some extent protect the Arduino board. This circuit is usually used to control motors, relays, lamps small, among others, the IN4007 diode protects the transistor from the inverse current.
Below are images from the design of the application, which was made in App Inventor and it is necessary to vary the maximum value of slider on the application and in my case assigned a value of 1023.