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

Sensirion SHT25 humidity sensor (I2C)

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="humid_sht_i2c">
b'<define name="SCP_I2C_DEV" value="i2cX" />\n '
</module>

Module configuration options

Define Options

  • name: SCP_I2C_DEV value: i2cX
    Description: select i2c peripheral to use (default i2c0)

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_periodic_i2c()
    • Frequency in Hz: 4
    • Delay: 0.
      Integer to impose a sequence (between 0 and main_freq/function_freq)
    • Autorun: LOCK
      Periodic function automatically starts after init and can't be stopped.
  • humid_sht_p_temp()
    • Frequency in Hz: 4
    • Delay: 0.4
      Integer to impose a sequence (between 0 and main_freq/function_freq)
    • Autorun: LOCK
      Periodic function automatically starts after init and can't be stopped.
  • humid_sht_p_humid()
    • Frequency in Hz: 4
    • Delay: 0.6
      Integer to impose a sequence (between 0 and main_freq/function_freq)
    • 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_i2c.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="humid_sht_i2c" dir="meteo">
<doc>
<description>Sensirion SHT25 humidity sensor (I2C)</description>
<define name="SCP_I2C_DEV" value="i2cX" description="select i2c peripheral to use (default i2c0)"/>
</doc>
<header>
<file name="humid_sht_i2c.h"/>
</header>
<init fun="humid_sht_init_i2c()"/>
<periodic fun="humid_sht_periodic_i2c()" freq="4" delay="0."/>
<periodic fun="humid_sht_p_temp()" freq="4" delay="0.4"/>
<periodic fun="humid_sht_p_humid()" freq="4" delay="0.6"/>
<event fun="humid_sht_event_i2c()"/>
<makefile target="ap">
<file name="humid_sht_i2c.c"/>
</makefile>
</module>