Skip to main content

Synapse SNAPpy library for HX711 Load Cell Amplifier/ADC

Project description

snappy-hx711 is a SNAPpy library that reads values from the HX711 24-bit ADC with amplifier designed to measure load cells.

Installation

For use in Portal

Download and extract the latest release zip file to Portal’s snappyImages directory. By default, this is located at ...\Documents\Portal\snappyImages on Windows.

For use with SNAPbuild/SNAPtoolbelt

The easiest way to install snappy-hx711 for use with SNAPbuild or SNAPtoolbelt is using pip:

pip install snappy-hx711

Alternatively you can download the source, extract it, and install it:

python setup.py install

Usage

To use the snappy-hx711 library functions, first import the library and call hx711_begin() with the pin numbers connected to the HX711. Then you can start taking measurements:

from snappy_hx711 import *

CLOCK_PIN = 6
DATA_PIN = 7

@setHook(HOOK_INIT)
def init():
    # Must be called before making measurements:
    hx711_begin(CLOCK_PIN, DATA_PIN)

def take_a_measurement():
    # Returns a 3-byte string:
    return hx711_read()

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

snappy-hx711-1.0.0.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

snappy_hx711-1.0.0-py2-none-any.whl (3.2 kB view details)

Uploaded Python 2

File details

Details for the file snappy-hx711-1.0.0.tar.gz.

File metadata

  • Download URL: snappy-hx711-1.0.0.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.14

File hashes

Hashes for snappy-hx711-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5fe5e82bd6cf1b793c14b287fd93003885fe65c58f6c1f9012e2f3a0353c5279
MD5 9af34ed4a9cd0770a92f51418e7d5a13
BLAKE2b-256 5670e7cb25f41820cde4617c99d7eba9d364eb5e661338d6716bf5ed816d24d2

See more details on using hashes here.

File details

Details for the file snappy_hx711-1.0.0-py2-none-any.whl.

File metadata

  • Download URL: snappy_hx711-1.0.0-py2-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.14

File hashes

Hashes for snappy_hx711-1.0.0-py2-none-any.whl
Algorithm Hash digest
SHA256 c5c3b80767ea15ebb82baf9e9dc18104444ce5f23a6d9a495a28ac7a87114602
MD5 759de515e8ce7e84345173aeaad26279
BLAKE2b-256 b5e21c1de8ad156aa026753ccc3f01cd80dd1029821daf1c2eeb212e2234fbf5

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