A library to drive a HX711 load cell amplifier on a Raspberry Pi
Project description
HX711
Description
This library allows to drive a HX711 load cess amplifier with a Raspberry Pi. It just provides the capabilities:
- to set channel an gain and
- to read raw values
This package requires RPi.GPIO to be installed in Python 3.
Getting started
Just install by pip3 install HX711
. A basic usage example is given below:
#!/usr/bin/python3
from hx711 import HX711
try:
hx711 = HX711(
dout_pin=5,
pd_sck_pin=6,
channel='A',
gain=64
)
hx711.reset() # Before we start, reset the HX711 (not obligate)
measures = hx711.get_raw_data(num_measures=3)
finally:
GPIO.cleanup() # always do a GPIO cleanup in your scripts!
print("\n".join(measures))
License
- Free software: MIT license
Credits
I used https://github.com/gandalf15/HX711/ as base.
This package was created with Cookiecutter_ and the audreyr/cookiecutter-pypackage
_ project template.
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
hx711-1.1.2.1.tar.gz
(16.5 kB
view details)
Built Distribution
File details
Details for the file hx711-1.1.2.1.tar.gz
.
File metadata
- Download URL: hx711-1.1.2.1.tar.gz
- Upload date:
- Size: 16.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
19a1bbea2ec32966d13d422cc905b8648201887b7d05349449b87d4b8f2379e8
|
|
MD5 |
9200fb758927612f8722c997e871f649
|
|
BLAKE2b-256 |
535d605f910fe7a41aab7b645d834d2d3718a61699013f554f2d4063d2ce74ce
|
File details
Details for the file hx711-1.1.2.1-py2.py3-none-any.whl
.
File metadata
- Download URL: hx711-1.1.2.1-py2.py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
eb5d1765dcd93acea9f7b24f939736839e2be23263a2bfed9adaca216f273c2d
|
|
MD5 |
3aecb1dc421348c20c3f63cca6205a79
|
|
BLAKE2b-256 |
1afd7e9252bfd60b0667ee319dc4543ec6768ed8facae0784622c0b24a65a72b
|