| 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
|
SampleDevice
|
| Collects the gyro readings from the device.
|
- VOID
|
Return
|
|
GetGyroReading
|
| Collects one of the gyroscope readings from the last sample.
|
- BYTE
|
Axis
|
| 0=X, 1=Y, 2=Z
|
- INT
|
Return
|
|
ReadRegister
|
| Reads a single register from the gyroscope and returns the value as a byte.
|
- BYTE
|
Address
|
|
|
- BYTE
|
Return
|
|
WriteRegister
|
| Writes a single register on the gyroscope.
|
- BYTE
|
Address
|
|
|
- BYTE
|
Data
|
|
|
- VOID
|
Return
|
|
Initialise
|
| Initialises the SPI bus ready to communicate with the sensor.
|
- VOID
|
Return
|
Property reference
|
Properties
|
|
Sensor Configuration
|
|
Output Data Rate
|
| Specifies the gryoscope sample data rate
|
|
Full Scale Selection
|
| Specifies the maximum angular speed which the sensor can measure in degrees per second
|
|
Bandwidth Selection
|
| Linked with data rate, See device datasheet table 21.
|
|
Filter Enable
|
| Enables automatic internal filtering on the gyro data
|
|
X Axis
|
| Enables or disables the selected axis allowing it to generate data or be switched off to save power.
|
|
Y Axis
|
| Enables or disables the selected axis allowing it to generate data or be switched off to save power.
|
|
Z Axis
|
| Enables or disables the selected axis allowing it to generate data or be switched off to save power.
|
|
SPI Connection
|
|
Channel
|
| SPI Channel selector
|
|
Prescale
|
| Prescale option selector
|
|
MOSI
|
| SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode.
|
|
MISO
|
| SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode.
|
|
CLK
|
| SPI Clock Pin CLK - The Clock signal is driven by the SPI master.
|
|
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.
|
|
Simulation
|
|
Label
|
|
|
|
Simulation Type
|
|
|
==Macro reference==
|
SampleDevice
|
| Collects the gyro readings from the device.
|
- VOID
|
Return
|
|
GetGyroReading
|
| Collects one of the gyroscope readings from the last sample.
|
- BYTE
|
Axis
|
| 0=X, 1=Y, 2=Z
|
- INT
|
Return
|
|
ReadRegister
|
| Reads a single register from the gyroscope and returns the value as a byte.
|
- BYTE
|
Address
|
|
|
- BYTE
|
Return
|
|
WriteRegister
|
| Writes a single register on the gyroscope.
|
- BYTE
|
Address
|
|
|
- BYTE
|
Data
|
|
|
- VOID
|
Return
|
|
Initialise
|
| Initialises the SPI bus ready to communicate with the sensor.
|
- VOID
|
Return
|
Property reference
|
Properties
|
|
Sensor Configuration
|
|
Output Data Rate
|
| Specifies the gryoscope sample data rate
|
|
Full Scale Selection
|
| Specifies the maximum angular speed which the sensor can measure in degrees per second
|
|
Bandwidth Selection
|
| Linked with data rate, See device datasheet table 21.
|
|
Filter Enable
|
| Enables automatic internal filtering on the gyro data
|
|
X Axis
|
| Enables or disables the selected axis allowing it to generate data or be switched off to save power.
|
|
Y Axis
|
| Enables or disables the selected axis allowing it to generate data or be switched off to save power.
|
|
Z Axis
|
| Enables or disables the selected axis allowing it to generate data or be switched off to save power.
|
|
SPI Connection
|
|
Channel
|
| SPI Channel selector
|
|
Prescale
|
| Prescale option selector
|
|
MOSI
|
| SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode.
|
|
MISO
|
| SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode.
|
|
CLK
|
| SPI Clock Pin CLK - The Clock signal is driven by the SPI master.
|
|
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.
|
|
Simulation
|
|
Label
|
|
|
|
Simulation Type
|
|
|
==Macro reference==
|
SampleDevice
|
| Collects the gyro readings from the device.
|
- VOID
|
Return
|
|
GetGyroReading
|
| Collects one of the gyroscope readings from the last sample.
|
- BYTE
|
Axis
|
| 0=X, 1=Y, 2=Z
|
- INT
|
Return
|
|
ReadRegister
|
| Reads a single register from the gyroscope and returns the value as a byte.
|
- BYTE
|
Address
|
|
|
- BYTE
|
Return
|
|
WriteRegister
|
| Writes a single register on the gyroscope.
|
- BYTE
|
Address
|
|
|
- BYTE
|
Data
|
|
|
- VOID
|
Return
|
|
Initialise
|
| Initialises the SPI bus ready to communicate with the sensor.
|
- VOID
|
Return
|
Property reference
|
Properties
|
|
Sensor Configuration
|
|
Output Data Rate
|
| Specifies the gryoscope sample data rate
|
|
Full Scale Selection
|
| Specifies the maximum angular speed which the sensor can measure in degrees per second
|
|
Bandwidth Selection
|
| Linked with data rate, See device datasheet table 21.
|
|
Filter Enable
|
| Enables automatic internal filtering on the gyro data
|
|
X Axis
|
| Enables or disables the selected axis allowing it to generate data or be switched off to save power.
|
|
Y Axis
|
| Enables or disables the selected axis allowing it to generate data or be switched off to save power.
|
|
Z Axis
|
| Enables or disables the selected axis allowing it to generate data or be switched off to save power.
|
|
SPI Connection
|
|
Channel
|
| SPI Channel selector
|
|
Prescale
|
| Prescale option selector
|
|
MOSI
|
| SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode.
|
|
MISO
|
| SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode.
|
|
CLK
|
| SPI Clock Pin CLK - The Clock signal is driven by the SPI master.
|
|
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.
|
|
Simulation
|
|
Label
|
|
|
|
Simulation Type
|
|
|