Paparazzi UAS  v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
dust_gp2y module

Sharp GP2Y1010AU dust sensor.

This reads the values for dust density from the Sharp GP2Y1010AU0F sensor through I2C (needs I2C ADC at the sensor).

Example for airframe file

Add to your firmware section:

1 <module name="dust_gp2y"/>

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.

  • dust_gp2y_periodic()
    • Frequency in Hz: 4
    • Delay: 1
      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 dust_gp2y.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="dust_gp2y" dir="meteo">
<doc>
<description>
Sharp GP2Y1010AU dust sensor.
This reads the values for dust density from the Sharp GP2Y1010AU0F sensor
through I2C (needs I2C ADC at the sensor).
</description>
</doc>
<header>
<file name="dust_gp2y.h"/>
</header>
<init fun="dust_gp2y_init()"/>
<periodic fun="dust_gp2y_periodic()" freq="4" delay="1"/>
<event fun="dust_gp2y_event()"/>
<makefile target="ap">
<file name="dust_gp2y.c"/>
</makefile>
</module>