Connect arduino with unity via bluetooth

Hello guys, I made a homemade VR headset with an MPU-6050 and my phone which acts like the display (I will download a pc streamer app) also I made a Unity game and a script to read the MPU values.. The whole thing works fine.. the only problem I got is the bluetooth. I want to send the MPU values to Unity with HC-05 module. Thanks

I have no idea what unity is and your problem is not really stated at all but, if you have a problem, it is probably not with Arduino.

If your "MPU values" are plain vanilla data, and "the whole thing works fine" this is very likely not an arduino problem, i.e. no change of programme is required. It is just a procedural problem. Connect bluetooth in the proper manner and go, all procedural problems are at the other end, which I understand is a phone.

If the values are not data, your problem may be protocol, and HC-05 was the wrong choice of bluetooth.

One can only guess at what "the whole thing" actually is.

Unity is a game engine... iam making a game for my VR to play with... So I want to connect the HC-05 with unity...

So I want to connect the HC-05 with unity...

If Unity can connect to a serial port, it really doesn't matter what is on the other side - a cable is NO different from a wireless device, as far as the PC side of the port is concerned.

If Unity can not connect to a serial port, you are trying to put lipstick on a pig.

Unity can connect to a serial port... So do I just wire the module to my nano and connect it with my laptop and check my COM number and put it to unity and that's it ? That is really easier than I thought! Thanks :D

Hardizzer: Unity can connect to a serial port... So do I just wire the module to my nano and connect it with my laptop and check my COM number and put it to unity and that's it ? That is really easier than I thought! Thanks :D

Hi, did you manage to do it? I am trying to connect my Arduino Nano with Bluetooth HC 05 to Unity project on my android but it seems like the serial port is only recognized on my PC. Can someone explain to me why mobile devices don't read COM ports in a similar way as PCs do? The Bluetooth pairs with my android, but there is no Port to send the data to. I tested it by listing all available Ports on my devices and the return is null. Thank you.

I guess the answer to your irrelevant question is that there is no need. Since you have paired Android with Bluetooth, you can mark that as a small but useful triumph. The next thing to do is ascertain that whatever Android app you are using is able to utilise Bluetooth communication by connecting with it. This will be done in the app, wherein you should see a list of previously paired devices. There is nothing in your post that suggests you actually have an Arduino problem, but there is quite a lot to suggest you haven’t the faintest idea of what is going on. Posting your code and a description of the wiring might go some way towards fixing that. You might also consider using a standard bluetooth terminal on Android first, in order to avoid unnecessary complication.

Check the readmes at the head of this forum and use code tags </>.