API for the Attys DAQ box (www.attys.tech)
Project description
Attys is a lightweight bluetooth DAQ box which can measure anything from temperature to ECG.
Required packages under Linux
For Ubuntu Linux install these packages:
sudo add-apt-repository ppa:berndporr/attys sudo add-apt-repository ppa:berndporr/usbdux sudo apt-get update sudo apt-get install attyscomm attyscomm-dev
For other Linux flavours install them from souce:
Quick start guide
Here are the basic steps how to use the API:
# load the module import pyattyscomm # Gets the AttysScan class which scans for Attys via bluetooth s = pyattyscomm.AttysScan() # Scan for Attys s.scan() # get the 1st Attys c = s.getAttysComm(0) # if an attys has been found c points to it. Otherwise it's None. # Start data acquisition in the background c.start() # Now we just read data at our convenience in a loop or timer or thread # if data is available you can read it from the ringBuffer while (not c.hasSampleAvilabale()): # do something else or nothing # getting a sample (array of all Attys channels) sample = c.getSampleFromBuffer() # do something with the sample print(sample) # rinse and repeat!
The full code is on github:
https://github.com/glasgowneuro/AttysComm/blob/master/cpp/demo/readdata_from_attys.py
API documentation
Query it via the python help system:
import pyattyscomm help(pyattyscomm.AttysScan) help(pyattyscomm.AttysComm)
The Python classes have been generated with SWIG. The header files AttysComm.h and AttysScan.h provide detailed info about the classes:
Demos
On github are two python demos: one which prints the ADC data to the screen and one which plots it with matplotlib.
https://github.com/glasgowneuro/AttysComm/tree/master/cpp/demo
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for pyattyscomm-1.2.2-py3.6-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80beb847b13c5433cd1b9e6048dac1c55547261be1a6f3fea33cde3a677eea56 |
|
MD5 | e6370f7ef82364b1b7e7d71077ce074a |
|
BLAKE2b-256 | ef99e3bfaf7909dc3a1bc7629c92888eb07c35b1527c4d45746d8797fbbd8b72 |
Hashes for pyattyscomm-1.2.2-py3.5-linux-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec49260a90e5d81bea21d2aa1af7c3aa3cd58f3a3ab61785bb668e759653738a |
|
MD5 | 3dce2b6b4c5e39246f4a3748e290359d |
|
BLAKE2b-256 | 562c0bbae6e3507bbdafc71358f2272df0f027cb910fc7982f5e2ae95301eaec |
Hashes for pyattyscomm-1.2.2-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad285ff2e6a52de5b50d2731bd082c760338e9d1b18d13df2374b2cc449568ca |
|
MD5 | b249c273d85b8869e8d22fd8687a18fa |
|
BLAKE2b-256 | ebc8e35abdba4a2bc55e6eb650dabb5776d4b133db792bb12ae58f091c39299b |