Skip to main content

BITalino Python API.

Project description

BITalino Python API

Provides the tools to interface with the BITalino hardware via bluetooth.

Get your BITalino, accessories, tools and support at: http://www.bitalino.com

Dependencies:

Disclaimer

Copyright (C) 2013 Team BIT

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Usage

Example:

>>> import bitalino
>>> device = bitalino.BITalino()
>>>
>>> macAddress = "00:13:01:04:04:15"
>>> SamplingRate = 1000
>>> device.open(macAddress, SamplingRate) # Set MAC address and sampling rate
>>>
>>> th = device.battery(20) # Set battery threshold
>>>
>>> BITversion = device.version() # Get BITalino firmware version
>>> print "version: ", BITversion
>>>
>>> device.start([0,3]) # Start Acquisition in Analog Channels 0 and 3
>>>
>>> dataAcquired = device.read(1000) # Read 1000 samples
>>>
>>> device.trigger([0,0,1,0]) # Turn BITalino led on
>>>
>>> device.stop() # Stop acquisition
>>> device.close()
>>>
>>> SeqN = dataAcquired[0,:]
>>> D0 = dataAcquired[1,:]
>>> D1 = dataAcquired[2,:]
>>> D2 = dataAcquired[3,:]
>>> D3 = dataAcquired[4,:]
>>> A0 = dataAcquired[5,:]
>>> A3 = dataAcquired[6,:]
>>> print SeqN

Project details


Download files

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

Source Distribution

bitalino-0.1.zip (10.0 kB view details)

Uploaded Source

File details

Details for the file bitalino-0.1.zip.

File metadata

  • Download URL: bitalino-0.1.zip
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for bitalino-0.1.zip
Algorithm Hash digest
SHA256 77d0f2cbc2ef8eeaeacb6fb78e35aa8197e5df79599458b19a7e9091a860f169
MD5 723a1d4082a50912a6f272d44b95526f
BLAKE2b-256 fc71df64c9444987931c66043a97a9e0eee3219ea748db9d9e653832f5e79abb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page