Skip to content

Commit 2bbd9ab

Browse files
Merge pull request bentalebahmed#3 from rango3526/master
Improve README.md
2 parents fda9f9b + a015ab9 commit 2bbd9ab

File tree

1 file changed

+26
-17
lines changed

1 file changed

+26
-17
lines changed

README.md

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,44 @@
11
# BlueUnity
2-
Plugin for using Bluetooth (teseted on HC-05, HC-06 and BM78 bluetooth modules) with Unity3d on Android
2+
BlueUnity is a plugin for using Bluetooth with Unity3d on Android.
33

4-
## How it Works
4+
## Installation
55

6-
Build the game using SampleScene or use the one i already built ( see in 'Use this build to test').
6+
Import `UnityAndroidBluetooth.unitypackage` into a Unity project. In the Scenes folder you will find a scene "SampleScene" to test the Bluetooth plugin.
77

8-
Pair your bluetooth device (tested on HC-05 and HC-06) with baud rate of 9600 to your android phone.
8+
## Usage
99

10-
Open the app.
10+
1) Build the game using SampleScene or use the one I already built (see in 'Use this build to test').
1111

12-
Enter the name of the bluetooth device, click Start.
12+
2) Pair your Bluetooth device with baud rate of 9600 to your android phone.
1313

14-
Enter data in the input filed named "Enter Data to send" and click send.
14+
3) Open the app.
1515

16-
To see incoming data, draw a circle in the screen with your finger to see a the Log Viewer (Unity-Logs-Viewer from assets store)
16+
4) Enter the name of the Bluetooth device, click Start.
1717

18-
Also see this video: https://www.youtube.com/watch?v=H3llkatHt1E (the sound is low sorry for that)
18+
5) Enter data in the input filed named "Enter Data to send" and click send.
1919

20-
If you want to edit the plugin and adapt it on your needs, check the "Android Studio src" file that contains the code of the plugin, check this video by CWGTech on Creating an Android plugin for Unity3D (https://www.youtube.com/watch?v=bmNMugkOQBI&list=WL&index=2&t=171s)
20+
6) To see incoming data, draw a circle in the screen with your finger to see a the Log Viewer (Unity-Logs-Viewer from assets store)
2121

22-
## Installation
22+
See [this video](https://www.youtube.com/watch?v=H3llkatHt1E) for a walkthrough (sorry for the low volume).
23+
24+
> **Note:** The plugin parses incoming data with `inputBuffer.readLine()`, which reads until it reaches a new line character ('\n').
25+
26+
## Bluetooth Compatibility
27+
28+
BlueUnity was tested on HC-05, HC-06 and BM78 Bluetooth modules.
29+
30+
## Adapting to Your Project
31+
32+
If you want to edit the plugin and adapt it on your needs, check the "Android Studio src" file that contains the code of the plugin, and see [this video](https://www.youtube.com/watch?v=bmNMugkOQBI&list=WL&index=2&t=171s) by CWGTech on Creating an Android plugin for Unity3D.
2333

24-
BluetoothPlugin is the Android Project if you want to check the code and make changes on the Jar file.
34+
Notes:
2535

26-
Add unityPackage to Unity, in folder Scenes you will find a scene "SampleScene" to test the buetooth plugin (teseted on HC-06, HC-05).
36+
* BluetoothPlugin is the Android Project if you want to check the code and make changes on the Jar file.
2737

28-
In folder Assets\Plugins you will find the Android plugin named classes, AndroidManifest (for adding Bluetooth permission) and C# script for handling the plugin for you.
38+
* In folder Assets\Plugins you will find the Android plugin named classes, AndroidManifest (for adding Bluetooth permission) and C# script for handling the plugin.
2939

30-
In Assets folder you will find a script (BluetoothTest) that contains functoin assigned to buttons to Start, Stop and send data to Bluetooth.
40+
* In Assets folder you will find a script (BluetoothTest) that contains function assigned to buttons to Start, Stop and send data to Bluetooth.
3141

32-
For the incoming data the plugin reads till new line appears ('\n') , (inputBuffer.readLine())
3342
<!--
3443
## Donation Button
3544
@@ -40,7 +49,7 @@ If this project helped you in your path, you can give me a cup of coffee :)
4049
-->
4150
## Contributing or Questions
4251

43-
Contact : bentalebahmed98@gmail.com
52+
Contact: bentalebahmed98@gmail.com
4453

4554
## License
4655
[MIT](https://choosealicense.com/licenses/mit/)

0 commit comments

Comments
 (0)