1. Windows Installation

MetaSensors are only supported on Windows 10 machines. Ensure you are running Windows 10 on a desktop or laptop.

Warning

Phones and tablets are not supported for development.

Windows developers can create either Universal Windows Apps or Python / .NET Core command line applications. For researchers, we also include a Matlab example.

As you go through this Windows tutorial, you will learn how to stream and log sensor data from MetaSensors using Python and C# on Windows. You will be able to make your own Windows App that you can publish on the Windows App store and you will be able to stream sensor data right into Matlab.

Note

We support Python and C# development on Windows.

1.1. Pre-Installation

Ensure that you are running Windows 10 or newer:

  1. Select the Start button, then select Settings > System > About.
  2. Under Windows specifications, you can find out which edition and version of Windows your device is running. It must be a version of Windows 10 or higher.
_images/windows-version-1.jpg
  1. You must be at least on the Fall Creator’s Update of Windows 10. Once you’re in the About page, on “Version”, you should see the 1709 number, and under “OS Build”, the number should be 16299.192 or later.
_images/windows-version-2.jpg

1.2. Installation

This tutorial will take you through all of the tools you need to install to develop with MetaSensors on Windows.

1.2.1. Prerequisites

Download the Visual Studio Installer: https://www.visualstudio.com/downloads/

_images/vs-installer-0.jpg

You can select:

  • Visual Studio 2017 Community Edition
  • Visual Studio 2017 Professional Edition (30 Day Free Trial)

Click on the downloaded exe file. Open up Visual Studio Installer.

_images/vs-installer-1.png

Visual Studio will start downloading the initial files. Download speed will vary as per your internet connection.

_images/vs-installer-4.png

Install Visual Studio. Click Install on the appropriate Product section.

_images/vs-installer-3.png

Install all of the required individual components by selecting “Individual components”.

_images/vs-installer-2.png

You must install:

  • C# and Visual Basic Roslyn compilers
  • MSBuild
  • Static analysis tools
  • .NET Framework 4.6.1 SDK
  • .NET Framework 4.6.1 targeting pack
  • .NET Framework 4.7.1 SDK
  • Visual Studio C++ core features
  • VC++ 2017 version 15.8 v14.15 latest v141 tools
  • Windows 10 SDK (10.0.17134.0)
  • C++/CLI support
  • Windows 10 SDK (10.0.16299.0) for UWP: C#, VB, JS
  • Windows 10 SDK (10.0.16299.0) for UWP: C++
  • Windows 10 SDK (10.0.16299.0) for Desktop C++ [x86 and x64]
  • Visual C++ compilers and libraries for ARM
  • Visual C++ runtime for UWP
  • Python 2 64-bit (2.7.14)
  • Visual C++ compilers and libraries for ARM64

Visual Studio Installer will download the relevant files based on all of your selections.

_images/vs-installer-5.png

You may need to reboot your computer.

1.2.2. Visual Studio

If you are new to visual studio, please follow the Microsoft tutorials: https://visualstudio.microsoft.com/vs/getting-started/

1.2.3. Postrequisites

To enable MSBUILD in the Command Prompt, you have to add the path to the .NET 4 Framework install on your machine to the PATH environment variable.

You can access the environment variables by:

  1. Right clicking on Computer
  2. Click Properties
  3. Then click Advanced system settings on the left navigation bar
_images/env-variables-1.jpg
  1. On the next dialog box click Environment variables
  2. Scroll down to PATH
  3. Edit it to include your path to the framework (don’t forget a “;” after the last entry in here).
_images/env-variables-2.jpg

For reference, my path was “C:\Program Files (x86)\MSBuild\14.0\Bin” and Python was “C:\Python27amd64”.

1.3. Hardware

Your computer needs to support Bluetooth Low Energy (Bluetooth 4.0 or later) to work with MetaSensors. First you will need to check if your computer supports it as-is by following the steps below:

  1. Open Start.
  2. Search for Device Manager and click the top result.
  3. Expand the Bluetooth category.
  4. Right-click the Bluetooth adapter, and select Properties.
_images/device-manager-bluetooth-1.jpg
  1. Click on the Advanced tab.
  2. Under “Firmware,” make a note of the LMP version number.
_images/device-manager-bluetooth-2.jpg
  1. After completing the steps, check the LMP number using the list below to find out the actual Bluetooth version:
_images/device-manager-bluetooth-3.png
  1. If your computer does not support Bluetooth 4 (LMP 6) or higher you will need a Bluetooth Dongle. You can purchase a BLE Dongle here.
  2. Plug in the dongle into a USB slot on your PC. Windows10 includes the basic Broadcom Bluetooth drivers required by the dongle and will install them automatically when it recognizes the new device.

Only 2-5 devices can be connected simultaneously. 3 devices max are recommended for optimal performance.

1.4. Command Line

You should be comfortable with the Windows cmd line.

There are many tools you can use and we highly recommend that you use the tools you are comfortable with. Here are the ones we use:

1.4.1. Git Bash

We recommend that you use git bash and the command line on windows. You can download git bash here: https://gitforwindows.org/ or https://git-scm.com/

_images/git-bash.png

1.4.2. Visual Studio

While we typically use VI or VIM as a quick editor, Visual Studio supports Python development and we recommend that beginners use it for Windows development.

1.4.3. Matlab

Follow the steps at: https://www.mathworks.com/help/install/introduction-to-installation-licensing-and-activation.html.

_images/matlab.png

Warning

A license is required for MATLAB.

1.5. Post-Installation

You are expected to be a confident developer to use the MetaWear SDKs. There are many great tutorials and online classes to learn a new language on the internet.

Select Python or C# and start coding.