Skip to main content

Based on SergeyPiskunov's implementation. More functionalities.

Project description

hx711-mpython

Micropython driver for the HX711 24-Bit Analog-to-Digital Converter

Latest version supports:

  • retrieving data from the channel 'A' with gain 128 and 64, the channel 'B' with gain 32 in a raw form and a form converted from the two's complement.
  • sending "power off" sequence to switch device to the power-saving mode.
  • sending "power on" sequence with the gain saved before the "power off".
  • checking if the device is ready for the data retrieval.

Example for the ESP8266:

Refer to the example folder. It can permorm tare and set a ratio to change the raw input. D_OUT pin is connected to the GPIO 5
PD_SCK pin is connected to the GPIO 4
Using internal HX711 oscillator, so ESP8266's frequency is set to 160000000

from scales import Scales

scale = Scales(d_out=4, pd_sck=5)
scale.reset()
scale.tare()
while True:
    if scale.is_ready():
        val = scale.stable_value()
        print(val)
        sleep_us(500)

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_micropython_impementation-0.0.2.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file hx711_micropython_impementation-0.0.2.tar.gz.

File metadata

File hashes

Hashes for hx711_micropython_impementation-0.0.2.tar.gz
Algorithm Hash digest
SHA256 229c89253093070f493010b712ee1ea6fc80b966e4f73885d717c5b94fdfa31c
MD5 2d287a1c8aa320cd3554102bb823597f
BLAKE2b-256 0b54f408ad833ce1c329d67b9b25aeafe26a99a0db9f248fdfa6ec087054b111

See more details on using hashes here.

File details

Details for the file hx711_micropython_impementation-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for hx711_micropython_impementation-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 62865cefa2a1a812567f0f52fff3b1ee42749313fbd8c27fcc8b459cfd2fc612
MD5 d4fe7e5c74bb81dde951f00ff615be51
BLAKE2b-256 d554c529728c9728d26e2e1e8c93e0dd5c29ef078a460761152eb94ea3e344e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page