Latest commit

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Nuimo SDK for Universal Windows Apps

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.

Installation

Windows project requirements

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).

NuGet package for the Nuimo library

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.

Usage

Basic usage

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:

  1. Create a PairedNuimoManager and call ListPairedNuimos(). This will return a IEnumerable<INuimoController>.

  2. In the next step you can establish a Bluetooth connection to a NuimoController by calling ConnectAsync().

  3. Subscribe to the events of the NuimoController in order to be notified.

The following code example demonstrates how to list paired Nuimos, connect a Nuimo and receive gesture events from your Nuimo.

Example code

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);}}

A ready to checkout Windows Universal demo app

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).

Contact & Support

Have questions or suggestions? Drop us a mail at developers@senic.com or create an issue. We'll be happy to hear from you.

License

The nuimo-windows source code is available under the MIT License.

About

Library for Windows 10 platforms to connect and communicate with Nuimo controllers made by Senic

Resources

Stars

24 stars

Watchers

14 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all \u003cpre\u003e\u003ccode\u003e blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks"); } } catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); } })(); })();
Skip to content

Latest commit

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Nuimo SDK for Universal Windows Apps

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.

Installation

Windows project requirements

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).

NuGet package for the Nuimo library

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.

Usage

Basic usage

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:

  1. Create a PairedNuimoManager and call ListPairedNuimos(). This will return a IEnumerable<INuimoController>.

  2. In the next step you can establish a Bluetooth connection to a NuimoController by calling ConnectAsync().

  3. Subscribe to the events of the NuimoController in order to be notified.

The following code example demonstrates how to list paired Nuimos, connect a Nuimo and receive gesture events from your Nuimo.

Example code

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);}}

A ready to checkout Windows Universal demo app

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).

Contact & Support

Have questions or suggestions? Drop us a mail at developers@senic.com or create an issue. We'll be happy to hear from you.

License

The nuimo-windows source code is available under the MIT License.

About

Library for Windows 10 platforms to connect and communicate with Nuimo controllers made by Senic

Resources

Stars

24 stars

Watchers

14 watching

Forks

Releases

Packages

Used by

Contributors

Languages