简体   繁体   中英

How to connect application and Arduino Via Bluetooth in Android?

I have Ardunio board.I want 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM