Component: Accelerometer (EB068, LIS3LV02DQ) (Inputs: Sensors)

From Flowcode Help
Revision as of 12:12, 21 July 2016 by BenR (talk | contribs) (XML import)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


Author Matrix Ltd.
Version 1.4 (Release)
Category Inputs: Sensors


Image Accelerometer (EB068, LIS3LV02DQ) component

LIS3LV02DQ Accelerometer sensor with options for I2C or SPI communications. Useful for approximating Pitch and Roll or for detecting acceleration. Also available in the form of the EB068 Accelerometer E-block.

Examples

No additional examples


Downloadable macro reference

SimReset1G

No additional information


Parameters

This macro has no parameters


Return value

This call does not return a value


CollectXYZData

Collect the data from the local accelerometer buffers.

The Axis parameter specifies the Axis to be read.

0 / 'x' / 'X' - X axis

1 / 'y' / 'Y' - Y axis

2 / 'z' / 'Z' - Z axis

Parameters

BYTE Axis


Return value

INT


UpdateXYZData

Reads from the accelerometer and updates the local XYZ variables.

Returns 1 for new data and 0 for no new data

Parameters

This macro has no parameters


Return value

BYTE


SimSetXYZ

Allows the XYZ slider values to be set via the simulation

Parameters

INT X
INT Y
INT Z


Return value

This call does not return a value


Initialise

Sets up up the communication bus and initialises the accelerometer module.

Returns 0 for success and > 0 for fail.

Parameters

This macro has no parameters


Return value

BYTE


Simulation macro reference

This component does not contain any simulation macros


Property reference

Bit Depth

This property is of type Signed integer and can be referenced with the variable name bit_depth.

No additional information


Bus Type

This property is of type Fixed list of ints and can be referenced with the variable name bus_type.

No additional information


Channel

This property is of type Fixed list of ints and can be referenced with the variable name channel.

No additional information


Stop Delay

This property is of type True or false and can be referenced with the variable name StopDel.

On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not

a 10ms delay between an I2C stop event and the next I2C start event.


Most modern microcontrollers will not have a problem so this property can be disabled to speed up the

I2C communications.

Data Rate

This property is of type Fixed list of ints and can be referenced with the variable name data_rate.

No additional information


Scale

This property is of type Fixed list of ints and can be referenced with the variable name scale.

No additional information


Interrupt Pin

This property is of type Single digital pin and can be referenced with the variable name int_pin.

No additional information


Power Pin

This property is of type Single digital pin and can be referenced with the variable name pwr_pin.

No additional information


SDA Pin

This property is of type Single digital pin and can be referenced with the variable name sda_pin.

No additional information


SCL Pin

This property is of type Single digital pin and can be referenced with the variable name scl_pin.

No additional information