Component: Gyroscope 3-Axis SPI (L3GD20) (Movement Orientation)

From Flowcode Help
Jump to navigationJump to search
Author Matrix TSL
Version 2.0
Category Movement Orientation


Gyroscope 3-Axis SPI (L3GD20) component

Allows access to a three axis digital gyroscope via an SPI interface. Useful for gaming, VR, motion control, navitagion and robotics.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

No additional examples







Macro reference

GetGyroReading

Fc9-comp-macro.png GetGyroReading
Collects one of the gyroscope readings from the last sample. 
Fc9-u8-icon.png - BYTE Axis
0=X, 1=Y, 2=Z 
Fc9-s16-icon.png - INT Return


Initialise

Fc9-comp-macro.png Initialise
Initialises the SPI bus ready to communicate with the sensor. 
Fc9-void-icon.png - VOID Return


ReadRegister

Fc9-comp-macro.png ReadRegister
Reads a single register from the gyroscope and returns the value as a byte. 
Fc9-u8-icon.png - BYTE Address
 
Fc9-u8-icon.png - BYTE Return


SampleDevice

Fc9-comp-macro.png SampleDevice
Collects the gyro readings from the device. 
Fc9-void-icon.png - VOID Return


WriteRegister

Fc9-comp-macro.png WriteRegister
Writes a single register on the gyroscope. 
Fc9-u8-icon.png - BYTE Address
 
Fc9-u8-icon.png - BYTE Data
 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Sensor Configuration
Fc9-type-16-icon.png Output Data Rate
Specifies the gryoscope sample data rate 
Fc9-type-16-icon.png Full Scale Selection
Specifies the maximum angular speed which the sensor can measure in degrees per second 
Fc9-type-16-icon.png Bandwidth Selection
Linked with data rate, See device datasheet table 21. 
Fc9-type-7-icon.png Filter Enable
Enables automatic internal filtering on the gyro data 
Fc9-type-16-icon.png X Axis
Enables or disables the selected axis allowing it to generate data or be switched off to save power. 
Fc9-type-16-icon.png Y Axis
Enables or disables the selected axis allowing it to generate data or be switched off to save power. 
Fc9-type-16-icon.png Z Axis
Enables or disables the selected axis allowing it to generate data or be switched off to save power. 
Fc9-conn-icon.png SPI Connection
Fc9-type-16-icon.png Channel
SPI Channel selector 
Fc9-type-16-icon.png Prescale
Prescale option selector 
Fc9-type-5-icon.png MOSI
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode. 
Fc9-type-5-icon.png MISO
SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode. 
Fc9-type-5-icon.png CLK
SPI Clock Pin CLK - The Clock signal is driven by the SPI master. 
Fc9-type-5-icon.png CS / SS
Chip Select / Slave Select Pin Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device.  
Fc9-conn-icon.png Simulation
Fc9-type-10-icon.png Label
 
Fc9-type-16-icon.png Simulation Type