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.1.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.1.1-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file JoyIT_hx711py-0.1.1.tar.gz.

File metadata

  • Download URL: JoyIT_hx711py-0.1.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.1.1.tar.gz
Algorithm Hash digest
SHA256 bb7bfded53da51031382fb2132a30f4d4bc1a67316e13ac8e082a439cc77a7a0
MD5 0fd1999df3812a887bc9dcd43350197b
BLAKE2b-256 9b46389a4c9310b9ed88bb6300ef3d86f16811823806ff0772cd4b5a71b006ec

See more details on using hashes here.

File details

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

File metadata

  • Download URL: JoyIT_hx711py-0.1.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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 864a7c527a78dc28fc9827c2eb88a058601b2c3e6a8dd8d189be142dc49723fc
MD5 68b5705830bac07ab310e84fdb3a5043
BLAKE2b-256 6877c5a8f4d340a017ebf0b2def706eceae42df1deb04f9d87bf2cf1bc0c5f52

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