1. Windows Installation¶
MetaSensors are only supported on Windows 10 machines. Ensure you are running Windows 10 on a desktop or laptop.
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.
We support Python and C# development on Windows.
Ensure that you are running Windows 10 or newer:
- Select the Start button, then select Settings > System > About.
- 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.
- 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.
This tutorial will take you through all of the tools you need to install to develop with MetaSensors on Windows.
Download the Visual Studio Installer: https://www.visualstudio.com/downloads/
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.
Visual Studio will start downloading the initial files. Download speed will vary as per your internet connection.
Install Visual Studio. Click Install on the appropriate Product section.
Install all of the required individual components by selecting “Individual components”.
You must install:
- C# and Visual Basic Roslyn compilers
- 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.
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/
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:
- Right clicking on Computer
- Click Properties
- Then click Advanced system settings on the left navigation bar
- On the next dialog box click Environment variables
- Scroll down to PATH
- Edit it to include your path to the framework (don’t forget a “;” after the last entry in here).
For reference, my path was “C:\Program Files (x86)\MSBuild\14.0\Bin” and Python was “C:\Python27amd64”.
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:
- Open Start.
- Search for Device Manager and click the top result.
- Expand the Bluetooth category.
- Right-click the Bluetooth adapter, and select Properties.
- Click on the Advanced tab.
- Under “Firmware,” make a note of the LMP version number.
- After completing the steps, check the LMP number using the list below to find out the actual Bluetooth version:
- 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.
- 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¶
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.
A license is required for MATLAB.
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.