Giter VIP home page Giter VIP logo

blueunity's Introduction

BlueUnity

Plugin for using Bluetooth (teseted on HC-05, HC-06 and BM78 bluetooth modules) with Unity3d on Android

How it Works

Build the game using SampleScene or use the one i already built ( see in 'Use this build to test').

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

Open the app.

Enter the name of the bluetooth device, click Start.

Enter data in the input filed named "Enter Data to send" and click send.

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)

Also see this video: https://www.youtube.com/watch?v=H3llkatHt1E (the sound is low sorry for that)

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)

Installation

BluetoothPlugin is the Android Project if you want to check the code and make changes on the Jar file.

Add unityPackage to Unity, in folder Scenes you will find a scene "SampleScene" to test the buetooth plugin (teseted on HC-06, HC-05).

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.

In Assets folder you will find a script (BluetoothTest) that contains functoin assigned to buttons to Start, Stop and send data to Bluetooth.

For the incoming data the plugin reads till new line appears ('\n') , (inputBuffer.readLine())

Contributing or Questions

Contact : [email protected]

License

MIT

blueunity's People

Contributors

bentalebahmed avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.