Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
hx711 module

Reading of multiple HX711 strain gauge sensors.

No detailed description...

Example for airframe file

Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!

<module name="hx711">
b'<define name="HX711_GAIN" value="1" />\n\n '
b'<define name="HX711_PWM_FREQUENCY" value="6000000" />\n '
b'<define name="HX711_DEVICES_NB" value="4" />\n '
b'<define name="HX711_DEVICES" value="{{port,pin,0},{port,pin,0},{port,pin,0},{port,pin,0}}" />\n '
b'<configure name="HX711_CLOCK" default="PWM_SERVO_1" />\n '
</module>

Module configuration options

Configure Options

  • name: HX711_CLOCK value: None
    Description: PWM to use for the clock

Define Options

  • name: HX711_GAIN value: 1
    Description: The gain of the sensor in pulses (128: 1)
  • name: HX711_PWM_FREQUENCY value: 6000000
    Description: Frequency of the generated PWM signal for clock precision of 0.5MHz
  • name: HX711_DEVICES_NB value: 4
    Description: The amount of sensors to read
  • name: HX711_DEVICES value: {{port,pin,0},{port,pin,0},{port,pin,0},{port,pin,0}}
    Description: The list of sensor port/pin pairs to read

Module functions

Init Functions

These initialization functions are called once on startup.

Event Functions

These event functions are called in each cycle of the module event loop.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw hx711.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="hx711" dir="sensors">
<doc>
<description>
Reading of multiple HX711 strain gauge sensors.
</description>
<define name="HX711_GAIN" value="1" description="The gain of the sensor in pulses (128: 1)"/>
<define name="HX711_PWM_FREQUENCY" value="6000000" description="Frequency of the generated PWM signal for clock precision of 0.5MHz"/>
<configure name="HX711_CLOCK" default="PWM_SERVO_1" description="PWM to use for the clock"/>
<define name="HX711_DEVICES_NB" value="4" description="The amount of sensors to read"/>
<define name="HX711_DEVICES" value="{{port,pin,0},{port,pin,0},{port,pin,0},{port,pin,0}}" description="The list of sensor port/pin pairs to read"/>
</doc>
<header>
<file name="hx711.h"/>
</header>
<init fun="hx711_init()"/>
<event fun="hx711_event()"/>
<makefile target="ap">
<configure name="HX711_CLOCK" default="PWM_SERVO_1"/>
<define name="HX711_PWM_PORT" value="$(HX711_CLOCK)_GPIO"/>
<define name="HX711_PWM_PIN" value="$(HX711_CLOCK)_PIN"/>
<define name="HX711_PWM_AF" value="$(HX711_CLOCK)_AF"/>
<define name="HX711_PWM_CHANNEL" value="$(HX711_CLOCK)_CHANNEL"/>
<define name="HX711_PWM_DRIVER" value="$(HX711_CLOCK)_DRIVER"/>
<file_arch name="hx711.c"/>
</makefile>
</module>