Jump to content

Component: Accel / Gyro 6-Axis (MPU-6886) (Movement Orientation)

From Flowcode Help
Author Matrix Ltd
Version 2.1
Category Movement Orientation


Accel / Gyro 6-Axis (MPU-6886) component

MPU-6886 Combined 6-Axis Accelerometer and Gyroscope sensors. Useful for working out data such as Pitch and Roll. Can be combined with a Magnetometer to also provide Yaw.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_MPU-6886.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_MPU-6886.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples






Macro reference

GetAccelReading

GetAccelReading
Collects one of the accelerometer readings from the last sample. 
- BYTE Axis
0=X, 1=Y, 2=Z 
- INT Return


GetGyroReadng

GetGyroReadng
Collects one of the gyroscope readings from the last sample. 
- BYTE Axis
0=X, 1=Y, 2=Z 
- INT Return


GetTempReadingInt

GetTempReadingInt
Collects the temperature reading in degrees C as an integer value. 
- INT Return


GetTempReadingReal

GetTempReadingReal
Collects the temperature reading in degrees C as a floating point value. 
- FLOAT Return


Initialise

Initialise
Startup the I2C bus and configure the device. Returns 1 if the device is ok and 0 if the device is not responding correctly. 
- BYTE Return


ReadRegister

ReadRegister
Reads the value from one of the registers onboard the device. 
- BYTE Address
 
- BYTE Return


SampleDevice

SampleDevice
Collects the accelerometer, gyro and temperature readings from the device, 
- VOID Return


WriteRegister

WriteRegister
Sets the value of one of the registers on the device. 
- BYTE Address
 
- BYTE Value
 
- VOID Return


Property reference

Properties
Device Specific
Address Bit AD0
 
Gyro Range
 
Accel Range
 
Connections
Channel
Channel selection 
SDA
Pin used for SDA (data signal) 
SCL
Pin used for SCL (clock signal) 
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.  
Baud Select
Baud rate option selector 
Baud Rate
Baud rate to be used 
Simulation
Simulate Comms
 
Comms Settings
Scope Traces
Selects if the component pin connections are automatically generated on the data recorder window or not. Yes: Automatically add the component pins to a group on the data recorder which will reflect the sim data during simultion. No: Do not show the pin signals on the data recorder window. 
Console Data
Selects if the console data is automatically generated or not 
API
Specifies the injector component on the panel to interact with to provide comms simulation.