Skip to main content

Python library to communicate with the FSR array

Project description

pyHman

License: MIT

This is a Python library for controlling and communicating with the FSRray device. This library provides high-level interfaces to handling data from an FSR (Force-Sensitive Resistor) array via serial port.

Installation

This package uses setuptools for distribution. You can install it via pip:

pip install pyFSRray

or directly from the source code:

git clone https://github.com/Aightech/pyFSRray.git
cd pyFSRray
python setup.py install

Requirements

  • Python 3.6+
  • socket (from the Python Standard Library)
  • logging (from the Python Standard Library)

Usage

import time
from FSRray import FSRray

def callback(values, dt):
    print("dt = {}".format(dt))
    print("values = {}".format(values))

fsrray = FSRray()
fsrray.set_callback(callback)
fsrray.connect()
time.sleep(10)
fsrray.disconnect()

Features and Functions

  • FSRray(width=16, verbose=False): This is the constructor for the FSRray class.
  • set_callback(callback): Sets the callback function which is invoked with the latest data from the FSR array.
  • connect(path="/dev/ttyACM0", baud=500000, timeout=3): Connects to the FSR array via the serial port.
  • disconnect(): Disconnects from the FSR array.

Contributions

Feel free to submit a pull request if you want to contribute to this project.

License

This library is distributed under the MIT License. Please see the LICENSE file for more information.

Support

If you have any questions or run into any problems, please open an issue in the GitHub repository.

Disclaimer

Use this software at your own risk. The authors are not responsible for any damage that may be caused directly or indirectly through the use of this software.

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

FSRray-1.1.1.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

FSRray-1.1.1-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file FSRray-1.1.1.tar.gz.

File metadata

  • Download URL: FSRray-1.1.1.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12

File hashes

Hashes for FSRray-1.1.1.tar.gz
Algorithm Hash digest
SHA256 7a0d75e0b2ba7b942135fc0f82becc73c2dcc3eff71dfb85e1c16539d78e4e79
MD5 bae217c4f79121e25a46135974f6a47d
BLAKE2b-256 4b56b378f3356888827075a4dc2ffaaea6fc94d64fa1db640b1a3bfcd6f6929f

See more details on using hashes here.

File details

Details for the file FSRray-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: FSRray-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12

File hashes

Hashes for FSRray-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f2038494ad89835df1ee62d071e0248f3e61c77281fda8d290cc461f29e54e4f
MD5 d2a3717db210c9aa89e8a816629bf5c7
BLAKE2b-256 1f6b3a2f8ab8328b1af52642785db64f375421c6b5f9da67a7b06f9bd80c7889

See more details on using hashes here.

Supported by

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