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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for snappy_hx711-1.0.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5c3b80767ea15ebb82baf9e9dc18104444ce5f23a6d9a495a28ac7a87114602 |
|
MD5 | 759de515e8ce7e84345173aeaad26279 |
|
BLAKE2b-256 | b5e21c1de8ad156aa026753ccc3f01cd80dd1029821daf1c2eeb212e2234fbf5 |