Component: Load Cell (HX711) (Sensors)

From Flowcode Help
Revision as of 10:26, 7 September 2018 by BenR (talk | contribs) (XML import)
Jump to navigationJump to search
Author Matrix TSL
Version 1.0 (Release)
Category Sensors


Image Load Cell (HX711) component

The HX711 load cell amplifier is used to get measurable data out from a load cell or strain gauge.

Examples

No additional examples


Downloadable macro reference

SetScaling

Sets the scaler for the samples to provide a meanningful value.

Default scaler is set to 1.0

Parameters

FLOAT Scaler
Unity Scale = 1.0


Return value

This call does not return a value


Zero

Zeros the reading at the current sample

Parameters

This macro has no parameters


Return value

This call does not return a value


Sample

Allows the HX711 to be directly read using the specified scaling amount.

Parameters

This macro has no parameters


Return value

LONG


SetSampleCount

Specifies the number of samples to perform when taking a reading.

The more samples the more filtered the signal will become from high frequency noise.

Parameters

BYTE NumSamples
Default 1. Range 1-20
UINT Delay
Time to wait between samples in milliseconds.


Return value

This call does not return a value


Initialise

Sets up the I/O ready for communications with the HX711 IC and performs an initial sample to set the channel and gain.

Must be called before calling other HX711 component macros.

Parameters

This macro has no parameters


Return value

This call does not return a value


Simulation macro reference

This component does not contain any simulation macros


Property reference

Input Channel

This property is of type Fixed list of ints and can be referenced with the variable name InputChannel.

Selects which channel to sample A or B.

Gain settings are channel specific.

A Gain can be 128x or 64x

B Gain is fixed at 32x

Input Gain

This property is of type Fixed list of ints and can be referenced with the variable name InputGain.

Gain settings are channel specific.

A Gain can be 128x or 64x

B Gain is fixed at 32x

Data

This property is of type Single digital pin and can be referenced with the variable name Data.

Data pin - connected to HX711 Data Out pin.

Clock

This property is of type Single digital pin and can be referenced with the variable name Clock.

Clock pin - connected to HX711 SCK pin.