ATTYS数据框的API(www.attys.tech)

pyattyscomm的Python项目详细描述


ATTYS是一个轻便的蓝牙数据采集盒,可以测量从温度到心电图的任何东西。

http://www.attys.tech

Linux下的必需软件包

为ubuntu linux安装libbluetooth dev:

sudo apt-get install libbluetooth-dev

对于其他Linux风格,请从souce安装:

https://github.com/glasgowneuro/AttysComm/tree/master/cpp

快速入门指南

下面是使用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文档

通过python帮助系统查询:

import pyattyscomm
help(pyattyscomm.AttysScan)
help(pyattyscomm.AttysComm)

python类是用swig生成的。头文件attyscomm.h和attysscan.h提供了有关类的详细信息:

https://github.com/glasgowneuro/AttysComm/tree/master/cpp

演示

在github上有两个python演示:一个用于打印 屏幕上的ADC数据和两个绘图演示。

https://github.com/glasgowneuro/AttysComm/tree/master/demo

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何提高我的软件项目的速度?   java将Jetty嵌入JavaSE项目   数组中的java重复字符   java我的Shell排序没有按预期工作,我需要一些帮助来找出我做错了什么   java如何在JBoss EAP6/AS7中应用先过滤后安全约束   java使用一个随机运算符来处理多个变量   java为什么我不能在文件中写我的二叉树?   java应用程序不会在Eclipse emulator上运行   我第一次尝试制作一个简单的基于瓷砖的java游戏   java为TermVectors安装Solr修补程序   java无法将更新的对象值从客户端发送到服务器,服务器读取不存在的值   Azure,java sdk,使用ARM模板部署无法转换参数文件   是否有一个Java等价于空合并运算符(?)在C#?   java如果只初始化了超类对象,是否可以调用特定于子类的方法?   向类文件传递值时出现java NullPointerException   java模不起作用   java Android TranslateAnimation动态更新布局的大小   数据结构如何在java中实例化队列对象?   java如果用户选择一些随机的相机应用程序,如何在安卓中正确处理相机意图?