开发者

How to connect application and Arduino Via Bluetooth in Android?

I have Ardunio board.I w开发者_JS百科ant to connect this Board through my application Via Bluetooth,and want to send my Tweets in this Ardunio board. Is this possible?

Please reply,

Thank you


I'm assuming that you already have a bluetooth shield for your Arduino, if not, then you must get one. Sparkfun carries a variety of different ones, I like to use the following: http://iteadstudio.com/store/index.php?main_page=product_info&cPath=18%E2%88%8Fucts_id=307

These will allow serial communication with your Arduino. The example bluetooth code: http://developer.android.com/resources/samples/BluetoothChat/index.html can be used "as is" to send messages to the Arduino for testing. You can also easily modify this example to meet your needs.

You will use the device acitity list code to detect your device and get the MAC address which is used to initiate the connection to your bluetooth shield. The service code allows you to connect, send and receive messages from the bluetooth device.

On the Arduino side you simply need to read and write via serial to send and receive the data.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜