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.1b24-py3.6-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 144b3ef1c72f9d71449cad68953158ca3617dd98d2bf33209ee2f01aba677593 |
|
MD5 | 9b93f964c033ee535082946f8cbf7180 |
|
BLAKE2b-256 | d853ec29a1956e75e22ba558d56b3faf0ea4f8e79e0907633845d73a91dfa0ab |
Hashes for pyattyscomm-1.2.1b24-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 388c451b80b5a9ee1c2324cf8d26167e0c85622ed610e4ddca603006e77b3e7c |
|
MD5 | 2d55785d969ddc0774db6a023f8f3d07 |
|
BLAKE2b-256 | 235c6fa5401637618f90d27698b784cd6f90eb6a80898315e435ad9f64e81090 |