GithubHelp home page GithubHelp logo

genki-wave's Introduction

Wave by Genki

Wave is a unique smart ring manufactured and maintained by Genki. This repository contains the official Python API interface for Wave, arguably the easiest way to work with data from motion sensors in Python.

The API provides access to Wave's onboard sensor data, as well as processed motion data using proprietary algorithms in an accessible form factor.

For more details, please refer to the technical documentation.

Wave

Installation

This package has been tested with python 3.8 on both macOS and Linux. Installation is straight forward.

python -m pip install genki-wave

Note that bluez is a requirement on Linux-based systems.

Setting up the Wave ring

Make sure you've installed the latest firmware on your Wave by following these instructions.

To turn Wave on press the middle button, to turn it off hold the top and bottom buttons down for one second.

Refer to the technical documentation for a detailed overview of how to use and interface with the API.

Quickstart

General

Turn Wave on and make sure it is not connected. To find the Bluetooth address of the nearest Wave, run the following

from genki_wave.discover import run_discover_bluetooth

run_discover_bluetooth()

And the following example uses a callback that prints out which button has been pressed, along with the sensor reading every 5 seconds.

from genki_wave.asyncio_runner import run_asyncio_bluetooth
from genki_wave.callbacks import ButtonAndDataPrint

callbacks = [ButtonAndDataPrint(print_data_every_n_seconds=5)]
ble_address = ""  # Address of the Wave ring, found in the previous step
run_asyncio_bluetooth(callbacks, ble_address)

Further examples are in the examples folder.

MIDI

The simples way to start is connecting Wave as a BLE MIDI device and running examples/run_midi.py. This example only depends on pygame and allows you to receive data from Wave in standalone mode.

Known issues

  • bleak the Python Bluetooth library, can only connect to devices that are not connected to the computer. After pairing Wave to a Linux machine Wave tends to connect automatically quite aggressively and cannot be accessed via bleak. One solution is to use bluetoothctl to disconnect before pairing with genki-wave.
  • Wave needs to be off and disconnected before receiving any data via the serial port.
  • There is an error when you have Wave connected via Bluetooth and use asyncio to receive data. If you kill the program, e.g., with a keyboard interrupt, Wave stays connected and has an invalid state. For the time being you can hold the top button for a few seconds to properly exit the program.

genki-wave's People

Contributors

roberttorfason avatar lucystrauss avatar egillsig avatar dingari avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.