serial-scale-hx711
Python driver for Arduino+HX711 serial weighing scales.
Renamed from
serial-weighing-scale(PyPI:serial-weighing-scale≤ 2.0.4). New releases publish underserial-scale-hx711. A deprecation stub remains on PyPI under the old name pointing here.
Hardware
- Arduino Uno (USB-A to USB-B cable)
- HX711 load cell amplifier (e.g. SparkFun SEN-13879)
- Load cell 100 g or 500 g (e.g. SEN-14727 / SEN-14728)
- Firmware: see
scale_firmware/(uses olkal/HX711_ADC)
The scale identifies itself as <SerialWeighingScale> over 115200 baud.
Install
pip install serial-scale-hx711
Or editable from this repo:
pip install -e .
Usage
from serial_scale_hx711 import Scale
scale = Scale(serial_port="/dev/ttyACM1")
scale.start() # connect and wait for firmware init
scale.tare()
weight = scale.read_weight_blocking() # grams, blocks until stable
scale.disconnect()
Auto-detect port
from serial_scale_hx711 import connect_serial_scale
scale = connect_serial_scale(["/dev/ttyACM0", "/dev/ttyACM1", "/dev/ttyACM2"])
API
| Method | Description |
|---|---|
start(timeout=10) |
Connect and wait for firmware ready |
tare() |
Zero the scale |
read_weight() |
Single reading (float or None) |
read_weight_blocking(n_valid, timeout) |
Block until N valid readings, return median |
read_weight_reliable(n_readings, measure) |
Repeated reads with custom aggregation |
identify() |
True if firmware responds with identity string |
get_calibration_factor() |
Read calibration factor from firmware |
disconnect() |
Close serial connection |
murineshiftwork integration
Used via murineshiftwork.logic.scale.SerialWeighingScaleAdapter. Install with:
pip install "murineshiftwork[calibration]"
Metadata
Release files for serial-scale-hx711 2.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| serial_scale_hx711-2.1.4.tar.gz | 9.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| serial_scale_hx711-2.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.5 kB
Release files / serial_scale_hx711-2.1.4.tar.gz
| Download URL | serial_scale_hx711-2.1.4.tar.gz |
|---|---|
| Size | 9.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f327da20d24c72417360a99834f715584f94573056a46edbdd8a67ab8b42ff1
|
|
BLAKE2b-256 checksum How to use checksums |
c1ca337ce114753c0887353856219c0f6eeda38215c851e227d8e52ba8ad0821
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / serial_scale_hx711-2.1.4-py3-none-any.whl
| Download URL | serial_scale_hx711-2.1.4-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d19684a4a3a856fc7a4f7e5e566f3ee64797886592a91b0345e5dd59139f7fa0
|
|
BLAKE2b-256 checksum How to use checksums |
ac5d07f793c5dba9ee2ee3dba1a103c93fa646e00b2f8d5f9efd143581863a9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|