Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
temp_adc module

Temperature ADC

Measure temperature of 3 sensores connecter to any ADC Can read LM35 or NTC sensor

Example for airframe file

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

1 <module name="temp_adc">
2  <define name="TEMP_ADC_CHANNELX" value="ADC_X" />
3  <define name="TEMP_ADC_CHANNELX_TYPE" value="XXXX" />
4 </module>

Module configuration options

Define Options

  • name: TEMP_ADC_CHANNELX value: ADC_X
    Description: choose which ADC is used for temperature sensor
  • name: TEMP_ADC_CHANNELX_TYPE value: XXXX
    Description: choose which type of sensor is used (LM35 or NTC)

Module functions

Init Functions

These initialization functions are called once on startup.

Periodic Functions

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

  • temp_adc_periodic()
    • Frequency in Hz: 10
    • 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 temp_adc.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="temp_adc" dir="sensors">
<doc>
<description>
Temperature ADC
Measure temperature of 3 sensores connecter to any ADC
Can read LM35 or NTC sensor
</description>
<define name="TEMP_ADC_CHANNELX" value="ADC_X" description="choose which ADC is used for temperature sensor"/>
<define name="TEMP_ADC_CHANNELX_TYPE" value="XXXX" description="choose which type of sensor is used (LM35 or NTC)"/>
</doc>
<settings>
<dl_settings>
<dl_settings name="temp_adc">
<dl_setting min="0" max="1" step="1" module="sensors/temp_adc" var="temp_adc_sync_send" shortname="sync_send" param="TEMP_ADC_SYNC_SEND" values="Off|On"/>
</dl_settings>
</dl_settings>
</settings>
<header>
<file name="temp_adc.h"/>
</header>
<init fun="temp_adc_init()"/>
<periodic fun="temp_adc_periodic()" freq="10"/>
<makefile target="ap">
<file name="temp_adc.c"/>
</makefile>
</module>