The Nuimo controller is an intuitive controller for your computer and connected smart devices. The Nuimo Windows SDK helps you to easily integrate your Windows Universal apps with Nuimo controllers.
Your Windows Universal project must target Windows 10. Earlier Windows versions do not support Windows Universal apps.
Make sure to add Bluetooth capability to your Package.appxmanifest and manually pair your Nuimo (Windows -> Settings -> Devices -> Bluetooth).
The NuimoSDK for Universal Windows Apps is available via the NuGet package manager. Verify that you have NuGet package manager installed in Visual Studio (Tools -> Extensions and Updates; Installed). In order to install the Nuimo library in your Universal Windows project you just need to right-click on the solution of your project, select "Manage NuGet packages" and search for NuimoSDK. Now you can simply install it.
The Nuimo library makes it very easy to connect your Windows Universal apps with Nuimo controllers. Remember that you have to pair your Nuimo manually (for further information see below: A ready to checkout Windows Universal demo app). It only takes three steps and a very few lines of code to list paired Nuimos and receive gesture events:
Create a
PairedNuimoManagerand callListPairedNuimos(). This will return aIEnumerable<INuimoController>.In the next step you can establish a Bluetooth connection to a
NuimoControllerby callingConnectAsync().Subscribe to the events of the
NuimoControllerin order to be notified.
The following code example demonstrates how to list paired Nuimos, connect a Nuimo and receive gesture events from your Nuimo.
usingNuimoSDK;usingSystem.Diagnostics;usingSystem.Linq;usingSystem.Threading.Tasks;classDemo{privatereadonlyPairedNuimoManager_pairedNuimoManager=newPairedNuimoManager();privateINuimoController_nuimoController;privateasyncTaskGetPairedNuimos(){varnuimoControllers=await_pairedNuimoManager.ListPairedNuimosAsync();_nuimoController=nuimoControllers.ElementAt(0);}privateasyncTaskConnect(){varisConnected=await_nuimoController.ConnectAsync();}privatevoidAddDelegates(){_nuimoController.GestureEventOccurred+=OnNuimoGestureEvent;_nuimoController.FirmwareVersionRead+=OnFirmwareVersion;_nuimoController.ConnectionStateChanged+=OnConnectionState;_nuimoController.BatteryPercentageChanged+=OnBatteryPercentage;_nuimoController.LedMatrixDisplayed+=OnLedMatrixDisplayed;}privatevoidOnNuimoGestureEvent(INuimoControllersender,NuimoGestureEventnuimoGestureEvent){Debug.WriteLine("Event: "+nuimoGestureEvent.Gesture+", "+nuimoGestureEvent.Value);}privatevoidOnFirmwareVersion(INuimoControllersender,stringfirmwareVersion){Debug.WriteLine(firmwareVersion);}privatevoidOnConnectionState(INuimoControllersender,NuimoConnectionStatenuimoConnectionState){Debug.WriteLine("Connection state: "+nuimoConnectionState);}privatevoidOnBatteryPercentage(INuimoControllersender,intbatteryPercentage){Debug.WriteLine("Battery percentage: "+batteryPercentage);}privatevoidOnLedMatrixDisplayed(INuimoControllersender){Debug.WriteLine("LED matrix displayed");}privatevoidSendMatrix(){vardisplayInterval=5.0;varmatrixString=" "+" "+" .. .. "+" . . "+" . "+" . . "+" .. .. "+" "+" ";_nuimoController?.DisplayLedMatrixAsync(newNuimoLedMatrix(matrixString),displayInterval,NuimoLedMatrixWriteOptions.WithFadeTransition);}}We've provided a ready to checkout Universal Windows app that demonstrates listing paired Nuimos, connecting and receiving events from your Nuimo controllers. It also provides a simple UI for creating a matrix and send it to your Nuimo. Simply clone the Nuimo Windows demo repository and open it in Visual Studio. If your IDE shows errors, just build the project. Make sure to add Bluetooth capability to your Package.appxmanifest and manually pair your Nuimo (Windows -> Settings -> Devices -> Bluetooth).
Have questions or suggestions? Drop us a mail at developers@senic.com or create an issue. We'll be happy to hear from you.
The nuimo-windows source code is available under the MIT License.