openmind-consortium / Omni-Python-Examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Omni-Python-Examples

This project contains sample code for streaming data from the OpenMind Server.

Overview

The OpenMind Server provides a gRPC interface for interacting with the Medtronic API. This allows for custom applications to be built on any operating system using any of the gRPC supported programming languages. These examples show how to stream time domain data from the Summit RC+S using Python.

The order of operations is as follows:

  1. Connect to the OpenMind Server
  2. Find and connect to a bridge
  3. Find and connect to a device
  4. Configure sensing on the Summit RC+S
  5. Stream time domain data from the Summit RC+S

Installation

This demo requires a Summit RC+S, a CTM, and the OpenMind Server.

These examples use Python3, so make sure it is installed. Run pip install grpcio to install the gRPC tools and then build the protobuf files found in the submodule OmniProtos.

After the protos are built, the protos directory needs to be added to the PYTHONPATH environment variable.

Running

To run this demo, turn on the CTM and place it on the Summit RC+S for pairing. Next, start the OpenMind Server by building and running the Visual Studio solution. If your OpenMind Server is running on localhost, then you can run python client.py as is. Otherwise, you can change the default IP address by running python client.py --ip <ip-address>. Once the client code is connected to the device, time domain packets of data should start printing in the terminal.

Future Work

Enabling stimulation coming soon...

About


Languages

Language:Python 93.8%Language:Shell 6.2%