Unity Arduino



So, I've been bored, and trying to learn the limits of Unity3d free edition. I also work with arduino (obviously), and came up with the idea that many people have.

This project send analog data collected by a joystick via serial port to unity. It is an ideal project to control third person characters or creat your own videogame control. This plugin will help you connect your unity game/app to your arduino robot/project,to control it, transfer data between the arduino and bluetooth enabled MacOS/iOS/Android/Windows PC/UWP. This plugin allows you to: Connect iOS device to Arduino via BLE Connect MacOS PC/Laptop to Arduino via BLE and Bluetooth Classic. Uduino is a Unity plugin simplifying communication between Arduino and Unity. It has all the mapping features most developers need for their interactive installations. Uduino aims to be a easy and simple, yet powerful solution for your Arduino/Unity experiments or projects.

Arduino Serial Example

Unity and arduino

Why can't use use an accelerometer and use it to view the 3d world that way?

Well, I did some research on the matter, and it seemed that everyone decided that you had to have a plugin in order to send and receive information. I've found that is not true.. to a point. (plugins mean you have to have the pro version which is currently $1200usd)

Importing the right stuff gets you to be able to read serial, and after a bit of annoyance on getting it to read the information right, and delaying the arduino by 10ms so that I could actually read the information, it works fine. At least in the standalone player in Windows. I'm not sure on mac, but I know that web player doesn't support it.

So, here I sit with some spiffy code, and decided that even though I haven't been in the Unity3d community long, I would simply post a bit of code that lets you get information from a serial device. (Note: You can use ANY serial device as long as you know how to read the information.)

ArduinoUnityPlugin

Unity Arduino

Unity Arduino

C# Code: Download office 365 home premium for mac.

Arduino test code:

What's the practical use? Well, I want to stick a screen to my face and the arduino to the top of my head and get some VR kind of effects from it. Wouldn't be too bad to get true VR effects for less then $200. Add to that a decent controller and a great game and you have the VR of the future!

I'd also like to be able to use my arms and such in this kind of system, but that's going a little overboard at this point. (though, with some bend sensors and some potentiometers I could probably create a decent control system)

Unity Arduino Bluetooth

So, let me know what you guys think! And, yeah.. I don't have an accelerometer yet. Bought one today though, so it should be here with in the week. ^_^

Description

Unity Arduino Button

THE PLUGIN CONNECTS TO MULTIPLE DEVICES AT THE SAME TIME
This plugin now supports BLE GATT characteristics communication for BLE on Android, MacOS, iOS and UWP.
Supports :
iOS: BLE
Android: BLE, BluetoothClassic
MacOS: BLE, BluetoothClassic
Windows PC: Bluetooth Classic, USB Cable
UWP: Bluetooth Classic, BLE
if you have any feature suggestion, you can fill this form
This plugin will help you connect your unity game/app to your arduino robot/project,to control it, transfer data between the arduino and bluetooth enabled MacOS/iOS/Android/Windows PC/UWP.
This plugin allows you to:
Connect iOS device to Arduino via BLE
Connect MacOS PC/Laptop to Arduino via BLE and Bluetooth Classic
Connect Android to Arduino via BLE and Bluetooth Classic
Connect Windows PC to Arduino via Bluetooth Classic
Connect Windows PC to Arduino via USB Cable
This plugin has been tested with HC-05/06, ESP32 modules for bluetooth classic
and HC-08 for BLE
A tutorial is also provided in the plugin to help you use the code.
This plugin does not require Unity Plus
In case of any troubles, contact me on my email so i can assist you.
This plugin only requires .NET 4.x framework
Thank you for the support
PS.
Once you get the plugin, move the PLUGIN folder from 'BluetoothAPI' folder to the main asset folder.
This plugin supports Unity 2018.3 and above.
It can be used with earlier version but the Windows Bluetooth Support may not function as expected