python模块通过lab流媒体层(lsl)传输bitalino数据

bitalino-lsl的Python项目详细描述


bitalino lsl

一个名为bitalino_lsl的python模块,用于通过lab流媒体层(lsl)传输bitalino数据。此模块通过bitalino python apiBITalino设备获取数据,并使用Lab Stream Layer来传输数据。

该模块应与python版本一起工作>;=2.7,尽管它只测试过:

  • Python2.7.15
  • Python3.6.5

开始

安装

pip install bitalino_lsl

示例

importbitalino_lslfrompylslimportStreamInlet,resolve_streamimporttime# MAC address of the BITalino deviceMAC_ADDRESS_BITALINO_DEVICE="20:17:11:1A:2B:3C"# List with channels of the BITalino device to be streamed to the LSL# This channels can be specified as a list or as a dictionary with their# position in the 10-20 system. BITalino uses bipolar electrodes so the# position will be defined by two points# CHANNELS = {0: 'Fp1-Fp2', 1: 'P3-T5'}CHANNELS=[0,1]# Connect with the BITalino devicedevice=bitalino_lsl.BitalinoLSL(MAC_ADDRESS_BITALINO_DEVICE)# Create the Stream with the channels informationdevice.create_lsl_EEG(CHANNELS)# Start the stream getting data from the BITalino devicedevice.start()# Get the Stream to read the data frominlet=StreamInlet(resolve_stream('type','EEG')[0])# Read the BITalino data for 5 secondst_end=time.time()+5whiletime.time()<t_end:sample,timestamp=inlet.pull_sample()print(sample)# Stop the devicedevice.stop()# Close the connection with the BITalino devicedevice.close()

文档

文档可用here

许可证

这个项目是根据GNU GPL v3

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

推荐PyPI第三方库


热门话题
Java例外。Lang.Stringindexoutofboundsexception索引超出范围(0)   java Spring引导Freemarker从2.2.0升级失败   重构Java反模式名称?包含对象的对象包含。。。等   用java处理JDBC可能出现的死锁的最佳方法   java无法访问主线程上的数据库,因为它可能会在很长一段时间内锁定UI   java如何将固定大小的画布包装在边框窗格中的滚动窗格居中?   java解析xsd文件后得到空结果   在html页面中表示XML文件的java   socketjava对象流   sql Java越界异常数据库   JavaJBoss7.1.1不会在Mavericks上启动   Twincat ADS事件驱动读取在一段时间后停止工作(Java)   java MyBatis使用生成的ID插入所有   Mojave上缺少MacOS Java控制面板   JavaGuice:如果多次注入相同的依赖项,是否注入了该依赖项的相同实例?