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.0.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.0-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: FSRray-1.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 fbe96618c2c2867a2166c7d66eba991cf2d07688e59fa7be9ceeb84bda54eb99
MD5 17266a3e596e55a0c172c44e797bc892
BLAKE2b-256 4b275979dc0efb8afbde70ea8588494fa9ee0d091ed19a6163dabaa50d6022db

See more details on using hashes here.

File details

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

File metadata

  • Download URL: FSRray-1.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7e7ed4aec22d0a585f36024f5c3001aefdaf790dd8b303f27ff5d9c0df85ef4a
MD5 6bb4f1ddae5352d55821d101dc051f31
BLAKE2b-256 b725858fd1486aaaf534003d062ecccc15d7185a930acaf6e65f6efc933a622f

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