Module XML file: temp_adc.xml
Measure temperature of 3 sensores connecter to any ADC Can read LM35 or 10k / 100k NTC sensor
Example for airframe file
This example contains all possible configuration options, not all of them are mandatory!
2 <load name="temp_adc.xml">
3 <define name="TEMP_ADC_CHANNELX" value="ADC_X" />
4 <define name="TEMP_ADC_CHANNELX_TYPE" value="XXXX" />
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 10k / 100k 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>
<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>