Are you an Arduino enthusiast that always wanted to remote control your projects via your Android phone but didn't have the time, the patience or the knowledge to build an Android Bluetooth Controller? Then ARDUINO BLUETOOTH CONTROLLER is what you need!
This android application can establish a connection with any Arduino/microcontroller project that involves a bluetooth module! It allows the user to set a UUID of his own bluetooth module in order to connect the android application with his projects!!! The default UUID that comes with this application is for the HC-06 Wireless Serial 4 Pin Bluetooth RF Transceiver Module RS232. (If you use default UUID in order to pair the BT module with your smartphone for the first time, you will have to give a 4-digit password. This password is '1234'.)
The application is comprised of 4 Command Modes:
1. Vehicle Mode : By pressing the "joystick" button the user can remote control a vehicle with specific gestures. For the interpretation of gestures to commands, the application uses the built-in accelerometer sensor of the smart device. There are 8 different gestures available (FRONT, BACK, LEFT, RIGHT, FRONT_LEFT, FRONT_RIGHT, BACK_LEFT, BACK_RIGHT).
You can set these gestures with your own custom commands through the the menu button "Set Commands".
Additionally, there is a STOP and an ANDROID button that can be assigned with custom commands as well.
***IMPORTANT*** The mode provides via the menu options the option to change the orientation of accelerometer axises (X->Y, Y->X) in order to operate properly in Android phones with different default orientation.
Moreover, menu options provide a sensitivity change button to modify the point where the app catches the gesture events for this mode. As the title suggests, this mode is specifically designed to remote control a vehicle which uses a bluetooth module and a microcontroller.
2. Fader Mode : This mode provides the user with a fader-seekbar that can send commands from 0-9 and allow the user to experiment with servos, leds, motors and many more.
3. Controller Mode : This mode provides a standard controller layout with 10 buttons in total that can be assigned with custom commands. The arrow buttons are specifically designed to send commands continuously while pressed, in order to simulate an actual controller.
4. Terminal Mode : This mode provides a terminal-like interface in which the user can type and send an individual or multiple commands which will execute sequentially. Since Arduino serial port receives one byte at a time, if the user types a string in the input text field, the application divides that string into characters and sends them one by one to Arduino. It should be noted that spaces or empty strings are skipped.
All application settings and commands are permanently stored and can be accessed and modified any time according to your needs .
##################################################################################################
Arduino Side Code
Below code is an example of how Arduino can "listen" the commands that receives through this Android application.
char incomingByte; // variable to receive data from the serial port
void setup() {
Serial.begin(9600); // start serial communication at 9600bps
}
void loop() {
if( Serial.available() > 0 ) // if data is available to read
{
incomingByte = Serial.read(); // read it and store it in 'incomingByte'
}
}
____________________________________
© 'Arduino' is a trademark of Arduino team
____________________________________
ଗତ ଅପଡେଟର ସମୟ
ଫେବୃଆରୀ 7, 2017