Component: Magnetometer (Inputs: Sensors)
Author | Matrix TSL |
Version | 1.4 (Release) |
Category | Inputs: Sensors |
Contents
Magnetometer component
LSM303DLHC Combined 6-Axis Accelerometer and Magnetometer sensors Useful for working out data such as Pitch and Yaw.
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
UpdateCompassData
Reads from the compass 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
SimSetAccelerometer
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
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
UpdateAccelerometerData
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
SimSetCompass
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
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
Power Mode
This property is of type Fixed list of ints and can be referenced with the variable name power_mode.
No additional information
Accel Data Rate
This property is of type Fixed list of ints and can be referenced with the variable name accel_data_rate.
No additional information
Accel Scale
This property is of type Fixed list of ints and can be referenced with the variable name accel_scale.
No additional information
Compass Data Rate
This property is of type Fixed list of ints and can be referenced with the variable name compass_data_rate.
No additional information
Compass Scale
This property is of type Fixed list of ints and can be referenced with the variable name compass_scale.
No additional information
I2C Channel
This property is of type Fixed list of ints and can be referenced with the variable name channel.
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
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