Skip to main content

API for the bluetooth Attys DAQ box (www.attys.tech)

Project description

Attys is a lightweight wearable bluetooth data acquisition box which can measure anything from temperature to ECG.

It’s cross platform and runs under Linux, Windows and macOS.

It has two 24 bit analogue channels, an accelerometer and a magnetometer.

http://www.attys.tech

Required packages under Linux

For Ubuntu Linux install libbluetooth-dev:

sudo apt-get install libbluetooth-dev

For other Linux flavours install them from souce:

https://github.com/glasgowneuro/attys-comm

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!

API documentation

Query it via the python help system:

import pyattyscomm
help(pyattyscomm)

The Python classes have been generated with SWIG. The header files AttysComm.h, AttysCommBase,h and AttysScan.h provide detailed info about the classes:

https://github.com/glasgowneuro/attys-comm

Demos

On github are python examples which show you how to plot realtime data from the Attys:

https://github.com/glasgowneuro/attys-python-examples

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyattyscomm, version 2.0.13.0
Filename, size File type Python version Upload date Hashes
Filename, size pyattyscomm-2.0.13.0-cp37-cp37m-macosx_10_15_x86_64.whl (76.9 kB) File type Wheel Python version 3.7 Upload date Hashes View
Filename, size pyattyscomm-2.0.13.0-cp37-cp37m-win_amd64.whl (79.0 kB) File type Wheel Python version 3.7 Upload date Hashes View
Filename, size pyattyscomm-2.0.13.0-py3.6-linux-x86_64.egg (305.9 kB) File type Egg Python version 3.6 Upload date Hashes View
Filename, size pyattyscomm-2.0.13.0-py3.7-macosx-10.15-x86_64.egg (80.2 kB) File type Egg Python version 3.7 Upload date Hashes View
Filename, size pyattyscomm-2.0.13.0-py3.7-win-amd64.egg (83.2 kB) File type Egg Python version 3.7 Upload date Hashes View
Filename, size pyattyscomm-2.0.13.0.tar.gz (42.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page