Jump to content

Component: Accelerometer 3-Axis (LIS3DHTR) (LIS3DHTR) (Movement Orientation)

From Flowcode Help
Author Matrix TSL
Version 1.6
Category Movement Orientation


Accelerometer 3-Axis (LIS3DHTR) component

LIS3DHTR 3-Axis Accelerometer sensor.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_Accelerometer_LIS3DHTR.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_Accelerometer_LIS3DHTR.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples







Macro reference

CollectXYZData

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 
- BYTE Axis
 
- INT Return


Initialise

Initialise
Sets up up the communication bus and initialises the accelerometer module. Returns 1 for success and 0 for fail. 
- BYTE Return


Read_Register

Read_Register
Reads a value from a register on the accelerometer. 
- BYTE Reg
 
- BYTE Return


SimReset1G

SimReset1G
 
- VOID Return


SimSetAccelerometer

SimSetAccelerometer
Allows the XYZ slider values to be set via the simulation 
- INT X
 
- INT Y
 
- INT Z
 
- VOID Return


UpdateAccelerometerData

UpdateAccelerometerData
Reads from the accelerometer and updates the local XYZ variables. Returns 1 for new data and 0 for no new data 
- BYTE Return


Write_Register

Write_Register
Writes a data value to a specific register on the accelerometer 
- BYTE Reg
 
- BYTE Data
 
- BYTE Return


Property reference

Properties
Bit Depth
 
Accel Data Rate
 
Accel Scale
 
SA0 Pin
 
Connections
Channel
Channel selection 
Baud Select
Baud rate option selector 
Baud Rate
Baud rate to be used 
Stop Delay
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.  
SDA
Pin used for SDA (data signal) 
SCL
Pin used for SCL (clock signal) 
Simulation
Simulate Comms
Yes: Accelerometer data will come from the simulation component sliders. No: Accelerometer data will come from the I2C CAL component - Injector etc