Hardware Hookup - sparkfun H3LIS331DL Breakout Hookup Manual

Accelerometer
Table of Contents

Advertisement

setHighPassCoeff(high_pass_cutoff_freq_cfg hpcoeff)
coefficient for the high pass filter. The actual cutoff frequency is dependent
upon the data rate set by
setODR()
where fs is the sampling frequency and Hpc is the high pass coefficient as
set by these constants:
- Sets coefficient to 8.
LIS331::HPC_8
- Sets coefficient to 16.
LIS331::HPC_16
- Sets coefficient to 32.
LIS331::HPC_32
- Sets coefficient to 64.
LIS331::HPC_64
-
enableHPF(bool enable)
true
HPFOOnIntPin(bool enable, intSource)
to the signal the interrupt is based on?
and the second parameter is 1 or 2 depending on which interrupt you wish
to apply this setting to.
- Pass
intActiveHigh(bool enable)
high,
to set it as active low. Default value is active high.
false
- Are the interrupt pins open-drain or push
intPinMode(pp_od _pinMode)
pull? Pass
or
LIS331::PUSH_PULL
intSrcConfig(int_sig_src src, pin)
interrupt, and which pin shows the interrupt. The options are:
- Interrupt source is the same as the pin number.
LIS331::INT_SRC
- Either interrupt will be reflected on the pin.
LIS331::INT1_2_SRC
- The "new data ready" signal will be reflected on the
LIS331::DRDY
pin.
- The boot mode status of the part is reflected on the
LIS331::BOOT
pin.
setFullScale(fs_range range)
below:
- +/-6g for the LIS331HH or +/-100g for the H3LIS331DH.
LOW_RANGE
- +/-12g for the LIS331HH or +/-200g for the
MED_RANGE
H3LIS331DH.
- +/-24g for the LIS331HH or +/-400g for the
HIGH_RANGE
H3LIS331DH.
- returns
bool newXData()
true
of X data register.
- same as
bool newYData()
newXData()
- same as
bool newZData()
newZData()
enableInterrupt(int_axis axis, trig_on_level trigLevel, interrupt, bool enable)
-
can be
,
axis
LIS331::X_AXIS
can be
trigLevel
LIS331::TRIG_ON_HIGH
can be 1 or 2, and
interrupt
enable
to disable it.
false
setIntDuration(duration, intSource)
0-127, and represents the time in number of samples that the sensor must
read above or below the threshold set by the user.
setIntThreshold(threshold, intSource)
magnitude above or below which an interrupt will occur, divided by 16. It
can range from 0-127.
intSource
Examples

Hardware Hookup

- Set the
. The cutoff frequency is (fs)/(6*Hpc),
to enable,
to disable.
false
- Does the high pass filter apply
to enable,
to disable,
true
false
to set the interrupt pin to active
true
.
LIS331::OPEN_DRAIN
- What sort of thing triggers an
- Sets the range of the part, as listed
if new X data is available since last read
for Y axis.
for Z axis.
, or
LIS331::Y_AXIS
LIS331::Z_AXIS
or
LIS331::TRIG_ON_LOW
is
to enable the interrupt and
true
-
can be any value from
duration
is 1 or 2.
intSource
-
is the absolute
threshold
is 1 or 2.
.
,
Page 7 of 12

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the H3LIS331DL and is the answer not in the manual?

Questions and answers

Table of Contents