Baro ETS (I2C).
Driver for the EagleTree Systems Baro Sensor. Has only been tested with V3 of the sensor hardware.
Notes: Connect directly to TWOG/Tiny I2C port. Multiple sensors can be chained together. Sensor should be in the proprietary mode (default) and not in 3rd party mode.
Sensor module wire assignments:
- Red wire: 5V
- White wire: Ground
- Yellow wire: SDA
- Brown wire: SCL
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="baro_ets">
2 <define name="BARO_ETS_SCALE" value="scale" />
3 <define name="BARO_ETS_ALT_SCALE" value="scale" />
4 <define name="BARO_ETS_ALT_SCALE" value="scale" />
5 <define name="BARO_ETS_START_DELAY" value="delay" />
6 <define name="BARO_ETS_SYNC_SEND" />
7 <configure name="BARO_ETS_I2C_DEV" value="i2cX" />
Module configuration options
Configure Options
- name:
BARO_ETS_I2C_DEV
value: i2cX
Description: set i2c peripheral (default: i2c0)
Define Options
- name:
BARO_ETS_SCALE
value: scale
Description: scale factor to convert raw ADC measurement to pressure in Pascal (default: 37.5)
- name:
BARO_ETS_ALT_SCALE
value: scale
Description: scale factor to convert raw ADC measurement to altitude change in meters (default: 0.32)
- name:
BARO_ETS_ALT_SCALE
value: scale
Description: pressure offset in Pascal when converting raw adc to real pressure (default: 101325.0=
- name:
BARO_ETS_START_DELAY
value: delay
Description: set initial start delay in seconds
- name:
BARO_ETS_SYNC_SEND
value: None
Description: flag to transmit the data as it is acquired
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.
- baro_ets_read_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 baro_ets.xml file:
<!DOCTYPE module SYSTEM "module.dtd">
<module name="baro_ets" dir="sensors">
<doc>
<description>
Baro ETS (I2C).
Driver for the EagleTree Systems Baro Sensor.
Has only been tested with V3 of the sensor hardware.
Notes:
Connect directly to TWOG/Tiny I2C port. Multiple sensors can be chained together.
Sensor should be in the proprietary mode (default) and not in 3rd party mode.
Sensor module wire assignments:
- Red wire: 5V
- White wire: Ground
- Yellow wire: SDA
- Brown wire: SCL
</description>
<configure name="BARO_ETS_I2C_DEV" value="i2cX" description="set i2c peripheral (default: i2c0)"/>
<define name="BARO_ETS_SCALE" value="scale" description="scale factor to convert raw ADC measurement to pressure in Pascal (default: 37.5)"/>
<define name="BARO_ETS_ALT_SCALE" value="scale" description="scale factor to convert raw ADC measurement to altitude change in meters (default: 0.32)"/>
<define name="BARO_ETS_ALT_SCALE" value="scale" description="pressure offset in Pascal when converting raw adc to real pressure (default: 101325.0="/>
<define name="BARO_ETS_START_DELAY" value="delay" description="set initial start delay in seconds"/>
<define name="BARO_ETS_SYNC_SEND" description="flag to transmit the data as it is acquired"/>
</doc>
<header>
<file name="baro_ets.h"/>
</header>
<init fun="baro_ets_init()"/>
<periodic fun="baro_ets_read_periodic()" freq="10."/>
<event fun="BaroEtsEvent()"/>
<makefile target="ap">
<configure name="BARO_ETS_I2C_DEV" default="i2c0" case="upper|lower"/>
<define name="USE_$(BARO_ETS_I2C_DEV_UPPER)"/>
<define name="BARO_ETS_I2C_DEV" value="$(BARO_ETS_I2C_DEV_LOWER)"/>
<file name="baro_ets.c"/>
</makefile>
</module>