All Projects → hbldh → pymetawear

hbldh / pymetawear

Licence: MIT license
Community developed SDK around the Python bindings for the C++ SDK

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects
shell
77523 projects

Projects that are alternatives of or similar to pymetawear

ios logger
Application for camera and sensor data logging (iOS)
Stars: ✭ 60 (+42.86%)
Mutual labels:  gyroscope, magnetometer, accelerometer, imu
MPU-9250-Sensors-Data-Collect
MPU9250 (MPU6500 + AK8963) I2C Driver in Python for Raspbery PI
Stars: ✭ 51 (+21.43%)
Mutual labels:  gyroscope, magnetometer, temperature, accelerometer
dana
DANA: Dimension-Adaptive Neural Architecture (UbiComp'21)( ACM IMWUT)
Stars: ✭ 28 (-33.33%)
Mutual labels:  sensor, gyroscope, magnetometer, accelerometer
MotionCollector
iOS app for collecting data from internal motion sensors (gyroscope, magnetometer, accelerometer) of iPhone and Apple Watch.
Stars: ✭ 55 (+30.95%)
Mutual labels:  gyroscope, accelerometer, sensors
IOsonata
IOsonata multi-platform multi-architecture power & performance optimized software library for fast and easy IoT MCU firmware development. Object Oriented design, no board package to define, just pure plug & play any boards
Stars: ✭ 40 (-4.76%)
Mutual labels:  bluetooth, ble, sensors
LaunchPadFlightController
TM4C123G based Flight Controller
Stars: ✭ 62 (+47.62%)
Mutual labels:  magnetometer, accelerometer, imu
Stats
macOS system monitor in your menu bar
Stars: ✭ 7,134 (+16885.71%)
Mutual labels:  bluetooth, temperature, sensors
CodeDroneDIY
The most simple, but working, quadricopter flight controller from scratch, using Arduino Uno/Nano.
Stars: ✭ 68 (+61.9%)
Mutual labels:  gyroscope, accelerometer, imu
imusensor
Python library for communication between raspberry pi and MPU9250 imu
Stars: ✭ 47 (+11.9%)
Mutual labels:  gyroscope, accelerometer, imu
GY-85
Arduino implementation for GY-85 (ADXL345 accelerometer, ITG3200 gyroscope and HMC5883L magnetometer)
Stars: ✭ 63 (+50%)
Mutual labels:  gyroscope, magnetometer, accelerometer
BetterJoyForDolphin
Allows the Nintendo Switch Pro Controller and Joycons to be used with the Dolphin Emulator
Stars: ✭ 44 (+4.76%)
Mutual labels:  gyroscope, bluetooth, accelerometer
aeyrium-sensor
A Flutter sensor plugin which provide easy access to the Pitch and Roll on Android and iOS devices.
Stars: ✭ 57 (+35.71%)
Mutual labels:  sensor, gyroscope, magnetometer
Sensors
A macOS application displaying the thermal, voltage and current sensor values.
Stars: ✭ 70 (+66.67%)
Mutual labels:  sensor, temperature, sensors
hoverboard-sideboard-hack-GD
Hoverboard sideboard hack for GD32 boards
Stars: ✭ 68 (+61.9%)
Mutual labels:  gyroscope, accelerometer, imu
Balance-Bot
A two-wheel self-balancing robot based on the ATmega2560 micro-controller.
Stars: ✭ 33 (-21.43%)
Mutual labels:  gyroscope, accelerometer, imu
GoFIT SDK Android
GoFIT SDK for Android — GOLiFE 手環 App 介接 SDK
Stars: ✭ 32 (-23.81%)
Mutual labels:  bluetooth, ble
BME680
Arduino Library to access the Bosch BME680 - temperature, pressure, humidity and gas sensor
Stars: ✭ 30 (-28.57%)
Mutual labels:  sensor, temperature
SmartSpin2k
Transform your spin bike into a Smart Trainer!
Stars: ✭ 88 (+109.52%)
Mutual labels:  bluetooth, ble
wiimote-webhid
A Wiimote implementation using WebHID - AKA: Wiimote for the Web
Stars: ✭ 31 (-26.19%)
Mutual labels:  bluetooth, accelerometer
daydream-node
Quick Node.js module to connect to the Daydream controller and receive all the data
Stars: ✭ 17 (-59.52%)
Mutual labels:  bluetooth, ble

PyMetaWear

https://img.shields.io/pypi/v/pymetawear

PyPI - License

https://dev.azure.com/hbldh/github/_apis/build/status/hbldh.pymetawear?branchName=master https://coveralls.io/repos/github/hbldh/pymetawear/badge.svg?branch=master

PyMetaWear is a community developed Python SDK started by Henrik Blidh . MbientLab does not provide support for this SDK.

Python package for connecting to and using MbientLab's MetaWear boards.

PyMetaWear can, from version 0.11.0, be used from both Windows and Linux. This is thanks to that the metawear package package is now depending on a new BLE library called PyWarble instead of gattlib. See installation instructions for more details about how to make it build on Windows.

Capabilities and Limitations

PyMetaWear was previously a wrapper around the MetaWear C++ API, providing a more Pythonic interface. In version 0.9.0 it instead becomes a wrapper around MetaWear's official Python SDK, doing the very same thing. The official SDK handles the actual board connections and communication while PyMetaWear aims to remove the low level feeling of interacting with the MetaWear board.

Installation

$ pip install pymetawear

Since version 0.11.0, the installation requirements for pymetawear has changed. See documentation for details on requirements for Linux and Windows respectively.

Documentation

Available in the Github pages of this repository.

Basic Usage

The MetaWear client can be used in two ways: either as Pythonic convenience class for handling a MetaWear board or as a simple communication client governed by the libmetawear C++ library.

Creating a client, and thus also setting up a Bluetooth connection to the MetaWear board, is equal for both the two usage profiles:

from pymetawear.client import MetaWearClient
c = MetaWearClient('DD:3A:7D:4D:56:F0')

Example

Blinking with the LED lights can be done like this with the convenience methods:

pattern = c.led.load_preset_pattern('blink', repeat_count=10)
c.led.write_pattern(pattern, 'g')
c.led.play()

or like this using the raw libmetawear shared library:

from ctypes import byref
from pymetawear import libmetawear
from mbientlab.metawear.cbindings import LedColor, LedPreset

pattern = Led.Pattern(repeat_count=10)
libmetawear.mbl_mw_led_load_preset_pattern(byref(pattern), LedPreset.BLINK)
libmetawear.mbl_mw_led_write_pattern(c.board, byref(pattern), LedColor.GREEN)
libmetawear.mbl_mw_led_play(c.board)

Bluetooth Low Energy Scanning

Actual addresses to your MetaWear board can be found by scanning with the included discover_devices method:

from pymetawear.discover import discover_devices
out = discover_devices()
print(out)
[(u'DD:3A:7D:4D:56:F0', u'MetaWear'), (u'FF:50:35:82:3B:5A', u'MetaWear')]

See the examples folder for more examples on how to use the libmetawear library with this client.

Modules

All functionality of the MetaWear C++ API is able to be used using the PyMetaWear client, and some of the modules have had convenience methods added to simplify the use of them. Below is a list of modules which have had their convenience methods written and one of modules that are awaiting such focus.

Completed Modules Unimplemented Modules
Accelerometer GPIO
Gyroscope NeoPixel
Haptic Color Detector
Switch Humidity
LED iBeacon
Barometer I2C
Magnetometer  
Temperature  
Settings  
Ambient Light  
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].