I have been working on a game that involves sending a string of text over Bluetooth from an Arduino Uno Rev 3 to the game.
Up till now, I had been doing all the testing in the editor, and retrieving the string of text by using Uniduino.
Unfortunately, Uniduino uses the System.IO.Ports namespace, which isn’t available on the Windows Store App platform. Thus, when I try to Build my game for deployment to the Hololens device, rather then testing in the editor, i get the error “The type or namespace name ‘SerialPort’ could not be found”.
Has anybody been able to read data from Bluetooth in their Hololens / Windows Store App game?
Ok, I think that post got me on the right track. I managed to get a non-Unity app on the Hololens read the BLE data.
The tutorial I followed is found here: www.simplicity.be (blog), and the code for it found on GitHub here. I’m using an Arduino Mega 2560 and a RedBearLab BLE Shield.
The problem I am having now is that I don’t know how to translate that tutorial into Unity.
Mainly, I think the issue is that the example uses the UniversalBeaconLibrary and I don’t know how to allow my Unity WSA to use that library.
You need to add the dll to your project, and have a separate folders for each platform you want to have. Example is a plugins folder then inside that folder have editor, x86, etc… then have a copy of the dll with the proper settings for each platform inside those folders.