Component: Gyroscope SPI (L3GD20) (Sensors)

From Flowcode Help
Revision as of 15:46, 16 February 2017 by BenR (talk | contribs) (XML import BR)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


Author Matrix TSL
Version 1.0 (Release)
Category Sensors


Image Gyroscope SPI (L3GD20) component

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

Examples

No additional examples


Downloadable macro reference

SampleDevice

Collects the gyro readings from the device.

Parameters

This macro has no parameters


Return value

This call does not return a value


GetGyroReading

Collects one of the gyroscope readings from the last sample.

Parameters

BYTE Axis
0=X, 1=Y, 2=Z


Return value

INT


ReadRegister

Reads a single register from the gyroscope and returns the value as a byte.

Parameters

BYTE Address


Return value

BYTE


WriteRegister

Writes a single register on the gyroscope.

Parameters

BYTE Address
BYTE Data


Return value

This call does not return a value


Initialise

Initialises the SPI bus ready to communicate with the sensor.

Parameters

This macro has no parameters


Return value

This call does not return a value


Simulation macro reference

This component does not contain any simulation macros


Property reference

Data Rate

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

Rate that the gyroscope is internally sampled and registers updated.

Bandwidth Selection

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

Linked with data rate, See device datasheet table 21.

Full Scale Selection

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

No additional information


Filter Enable

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

No additional information


Channel

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

SPI Channel selector

Prescale

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

Prescale option selector

CS Pin

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

No additional information


MOSI

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

No additional information


MISO

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

No additional information


CLK

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

No additional information