Design
The app was designed to be simple to use. The app allows
a Bluetooth connection to be made before proceeding to a new window that
contains four button that can be used to operate the pan and tilt mechanism.
The app was designed for an Android operating system running Android 2.3
Gingerbread or newer.
Implementation
The app was developed for an android operating system and
Eclipse was used with an android plug-in. The app makes use of the Bluetooth
functionality that is supported with the android plug-in to make a Bluetooth
connection to available Bluetooth devices. First a Bluetooth adapter has to be
found and then a connection can be made through a socket. This can only work
with devices that have previously been paired together. The app will indicate
if the devices have been paired together as beside the Bluetooth adapter name
should contain (Paired). If the devices have not been previously paired then
this operation will need to be completed before the devices can be connected.
When the devices are connected a new window will appear that will contain four
buttons that control the movement of the pan and tilt mechanism.
The app communicates through the socket to the Bluetooth
adapter by sending bytes. The Bluetooth adapter is connected to an Arduino
which is continuously listening to receive data. The app will send a different
byte to represent which button is pressed. The socket write function is used to
send the bytes. The app can also receive data but this functionality is not required
in this application.
There are two ways in which the pan and tilt mechanism
can be controlled. These are: by pressing the buttons at one press at a time;
or by holding the buttons down to implement a sweeping nature of the pan and
tilt mechanism.
download the app from here:
https://www.dropbox.com/s/s7cr6cw53rzcg75/Bluetooth_1.apk
No comments:
Post a Comment