|Since||Origin / Contributor||Maintainer||Source|
|2015-10-09||Chris Takahashi||Chris Takahashi||hx711.c|
This module provides access to an HX711 load cell amplifier/ADC. The HX711 is an inexpensive 24bit ADC with programmable 128x, 64x, and 32x gain. Currently only channel A at 128x gain is supported.
Note: To save ROM image space, this module is not compiled into the firmware by default.
Initialize io pins for hx711 clock and data.
clkpin the hx711 clock signal is connected to
datapin the hx711 data signal is connected to
-- Initialize the hx711 with clk on pin 5 and data on pin 6 hx711.init(5,6)
Read digital loadcell ADC value.
mode ADC mode. This parameter is currently ignored and reserved to ensure backward compatability if support for additional modes is added. Currently only channel A @ 128 gain is supported.
a number (24 bit signed ADC value extended to the machine int size)
-- Read ch A with 128 gain. raw_data = hx711.read(0)