Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
humid_sht_uart module

SHTxx humidity sensor.

This reads the values for humidity and temperature from the SHTxx sensor through an uart.

Example for airframe file

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

<module name="humid_sht_uart">
b'<configure name="SHT_UART" value="UARTX" />\n '
</module>

Module configuration options

Configure Options

  • name: SHT_UART value: UARTX
    Description: UART on which computer is connected

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.

Periodic Functions

These functions are called periodically at the specified frequency from the module periodic loop.

  • humid_sht_uart_periodic()
    • Frequency in Hz: 1.
    • Autorun: LOCK
      Periodic function automatically starts after init and can't be stopped.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw humid_sht_uart.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="humid_sht_uart" dir="meteo">
<doc>
<description>
SHTxx humidity sensor.
This reads the values for humidity and temperature from the SHTxx sensor through an uart.
</description>
<configure name="SHT_UART" value="UARTX" description="UART on which computer is connected"/>
</doc>
<header>
<file name="humid_sht_uart.h"/>
</header>
<init fun="humid_sht_uart_init()"/>
<periodic fun="humid_sht_uart_periodic()" freq="1."/>
<event fun="humid_sht_uart_event()"/>
<makefile target="ap">
<configure name="SHT_UART" case="upper|lower"/>
<file name="humid_sht_uart.c"/>
<define name="USE_$(SHT_UART_UPPER)"/>
<define name="MET_LINK" value="$(SHT_UART_LOWER)"/>
<define name="$(SHT_UART_UPPER)_BAUD" value="B115200"/>
</makefile>
</module>