Skip to main content

Updated Python library for the HX711 load cell amplifier and Raspberry Pi 5

Project description

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

  1. Place nothing on the scale, run the calibration.py and record the output. That is the offset.
  2. Place a known weight like 1kg(1000g) on the scale, record the output as weight.
  3. 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

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

joyit_hx711py-0.0.1.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

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

JoyIT_hx711py-0.0.1-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file joyit_hx711py-0.0.1.tar.gz.

File metadata

  • Download URL: joyit_hx711py-0.0.1.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.7

File hashes

Hashes for joyit_hx711py-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ea5eb89fba04b36ebccd1d2d9adbc02d400f323419521ba6aab81ea883e02c10
MD5 657a287cd05ea3281dd03e5b27cb1d76
BLAKE2b-256 c8e70c6d1d96ecf90add06a46916625c20f61b3c0b143878288e1ab4643791b6

See more details on using hashes here.

File details

Details for the file JoyIT_hx711py-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: JoyIT_hx711py-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.7

File hashes

Hashes for JoyIT_hx711py-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d2ca2699f6a5c84a8c7344860ab6a4de3967013b50daece0d2220f8a2d1cb0a0
MD5 1c82b58b0d1cc0d883a3e00ab2071a07
BLAKE2b-256 2d3c06ff855383ffee3fe96fc96ddfd2dbad94f8c89c8772aa5bfd39d6198bd7

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