HX711PY
Updated Python library for the HX711 load cell amplifier and Raspberry Pi 5
Installation
You can install this library from PyPI. To install it for the current user on your Raspberry Pi, use the following command:
pip install JoyIT-hx711py
Initial Calibration
- Place nothing on the scale, run the calibration.py and record the output. That is the offset.
- Place a known weight like 1kg(1000g) on the scale, record the output as weight.
- Calculate the ratio
ratio = (w - offset) / 1000
1000 being the 1000 grams or the weight previously placed on scale
Edit the example.py file with the offset and ratio
def setup():
"""
code run once
"""
hx.set_offset(`Place offset here`)
hx.set_scale(`Place ratio here`)
hx.tare()
pass
Resources
Source code adapted from:
https://gist.github.com/underdoeg/98a38b54f889fce2b237
Documentation adapted from:
https://github.com/aguegu/ardulibs/tree/master/hx711
HX711 Datasheet (EN):
http://image.dfrobot.com/image/data/SEN0160/hx711_english.pdf
Metadata
Release files for JoyIT-hx711py 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| JoyIT_hx711py-0.1.1.tar.gz | 10.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| JoyIT_hx711py-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.2 kB
Release files / JoyIT_hx711py-0.1.1.tar.gz
| Download URL | JoyIT_hx711py-0.1.1.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb7bfded53da51031382fb2132a30f4d4bc1a67316e13ac8e082a439cc77a7a0
|
|
BLAKE2b-256 checksum How to use checksums |
9b46389a4c9310b9ed88bb6300ef3d86f16811823806ff0772cd4b5a71b006ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.7
|
Release files / JoyIT_hx711py-0.1.1-py3-none-any.whl
| Download URL | JoyIT_hx711py-0.1.1-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
864a7c527a78dc28fc9827c2eb88a058601b2c3e6a8dd8d189be142dc49723fc
|
|
BLAKE2b-256 checksum How to use checksums |
6877c5a8f4d340a017ebf0b2def706eceae42df1deb04f9d87bf2cf1bc0c5f52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.7
|