https://github.com/mbientlab/metawear-sdk-cpp
MetaWear C++ SDK - Platform Agnostic - Main lib - No Bluetooth
https://github.com/mbientlab/metawear-sdk-cpp
bluetooth-le cpp14 ios linux metamotion metawear metawear-sdk msbuild osx sensors windows
Last synced: 6 months ago
JSON representation
MetaWear C++ SDK - Platform Agnostic - Main lib - No Bluetooth
- Host: GitHub
- URL: https://github.com/mbientlab/metawear-sdk-cpp
- Owner: mbientlab
- License: other
- Created: 2015-09-28T05:49:56.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2023-07-30T16:52:07.000Z (about 2 years ago)
- Last Synced: 2025-04-01T13:19:50.550Z (6 months ago)
- Topics: bluetooth-le, cpp14, ios, linux, metamotion, metawear, metawear-sdk, msbuild, osx, sensors, windows
- Language: C++
- Homepage: https://mbientlab.com
- Size: 2.94 MB
- Stars: 46
- Watchers: 10
- Forks: 42
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# MetaWear SDK for C++ by MBIENTLAB
[](https://github.com/mbientlab/MetaWear-SDK-Cpp)
[](https://github.com/mbientlab/MetaWear-SDK-Cpp/blob/master/LICENSE.md)
This project is a C++ implementation of the MetaWear protocol. If compiled as a shared library, it can be used with any language that supports calling C functions from a shared library, such as Node and Python.
The library only constructs the bytes for communicating with the MetaWear platform, it **does not** contain any Bluetooth LE code. Users will need to fill in the appropriate Bluetooth LE functions for their target platform.
> This library is platform agnostic and does not contain any Bluetooth code. You are responsible for adding in this functionality.
Version 0.30.0 supports the following boards:
- [x] MMS
- [x] MMC
- [x] MMR + MMRL
- [ ] MetaTracker
- [ ] MetaWear HR / PPG
- [ ] MMM (mini)
- [ ] MWR, MWRG, MWRGPro
- [ ] MWC, MWCPro, MWCenv, MWCDetect
- [ ] Custom boards### Overview
[MetaWear](https://mbientlab.com) is a complete development and production platform for wearable and connected device applications.MetaWear features a number of sensors and peripherals (button, acceleromter, LED, gyroscope, magnetometer, ambient light, IOs...) all easily controllable over Bluetooth 4.0/5.0 Low Energy using this SDK.
### Requirements
- [MetaWear board](https://mbientlab.com/store/)
- A linux/mac/windows machine with Bluetooth 4.0 or Bluetooth 5.0### Notes
- Our tutorials will mostly reflect usage on iOS and Linux (see our Swift, Python and Javascript SDKs)
- Some Windows support is provided with Python.### License
See the [License](https://github.com/mbientlab/MetaWear-SDK-Cpp/blob/master/LICENSE.md).### Support
Reach out to the [community](https://mbientlab.com/community/) if you encounter any problems.## Getting Started
### Installation
Building the project has been tested on Linux Debian with Clang 15.### Usage
```sh
> clang++ --version
clang version 15.0.6
Target: x86_64-unknown-linux-gnu
```
```bat
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community>cl.exe
Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25019 for x64
Copyright (C) Microsoft Corporation. All rights reserved.usage: cl [ option... ] filename... [ /link linkoption... ]
```### GCC and Clang
Linux users can build the project by invoking GNU make; the default action is to build the shared library for your current platform. You can also change the C++ compiler by overriding the CXX make variable.```sh
> make# build using g++ as the compiler
> make CXX=g++
```Upon a successful compile, the library will be placed in the newly created "dist" directory.
```sh
> tree dist
dist/
└── release
└── lib
└── x64
├── libmetawear.so -> libmetawear.so.0
├── libmetawear.so.0 -> libmetawear.so.0.30.0
└── libmetawear.so.0.30.0```
## Testing
Unit tests for the library are written in Python (min v3.4.1) and can be invoked by calling the test target.### GNU Make
```sh
> make test
python3 -m unittest discover -s test
.................................................................................
.................................................................................
.................................................................................
.................................................................................
..............................s..................................................
........................................................
----------------------------------------------------------------------
Ran 461 tests in 33.249sOK (skipped=1)
```### Tutorials
Tutorials can be found [here](https://mbientlab.com/tutorials/).