Difference between revisions of "Component: Gyroscope 3-Axis (L3G4200D) (Movement Orientation)"

From Flowcode Help
Jump to navigationJump to search
Line 17: Line 17:
 
==Component Source Code==
 
==Component Source Code==
  
Please click here to download the component source project: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_Gyroscope_L3G4200D.fcfx FC_Comp_Source_Gyroscope_L3G4200D.fcfx]
+
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Gyroscope_L3G4200D.fcfx FC_Comp_Source_Gyroscope_L3G4200D.fcfx]
  
 
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Gyroscope_L3G4200D.fcfx FC_Comp_Source_Gyroscope_L3G4200D.fcfx]
 
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Gyroscope_L3G4200D.fcfx FC_Comp_Source_Gyroscope_L3G4200D.fcfx]
  
 
==Detailed description==
 
==Detailed description==
 +
 +
  
  
Line 44: Line 46:
  
 
==Examples==
 
==Examples==
 +
 +
  
  
Line 68: Line 72:
  
 
==Macro reference==
 
==Macro reference==
 +
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetZ'''
 +
|-
 +
| colspan="2" | Returns the previously sampled Z axis data 
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 +
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetY'''
 +
|-
 +
| colspan="2" | Returns the previously sampled Y axis data 
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 +
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetX'''
 +
|-
 +
| colspan="2" | Returns the previously sampled X axis data 
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 +
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SampleDevice'''
 +
|-
 +
| colspan="2" | Reads the Axis data from the device 
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 +
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadRegister'''
 +
|-
 +
| colspan="2" | Read the data byte at the given address of the device 
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Reg
 +
|-
 +
| colspan="2" | address of the register to be read 
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 +
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteRegister'''
 +
|-
 +
| colspan="2" | Writes the data byte to the given address of the device. Returns 0 if successful 
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Reg
 +
|-
 +
| colspan="2" | address of register to be written with data byte 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Data
 +
|-
 +
| colspan="2" | data byte to be written to device register 
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 +
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 +
|-
 +
| colspan="2" | Initialise the component. 
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 +
 +
 +
 +
==Property reference==
 +
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Output Data Rate
 +
|-
 +
| colspan="2" |  
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Full Scale Selection
 +
|-
 +
| colspan="2" | Specifies the maximum angular speed which the sensor can measure in degrees per second 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | X Axis
 +
|-
 +
| colspan="2" |  
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Y Axis
 +
|-
 +
| colspan="2" |  
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Z Axis
 +
|-
 +
| colspan="2" |  
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 +
| width="90%" | Label
 +
|-
 +
| colspan="2" |  
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connection
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Channel
 +
|-
 +
| colspan="2" | Channel selection 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 +
| width="90%" | SDA
 +
|-
 +
| colspan="2" | Pin used for SDA (data signal) 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 +
| width="90%" | SCL
 +
|-
 +
| colspan="2" | Pin used for SCL (clock signal) 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Baud Select
 +
|-
 +
| colspan="2" | Baud rate option selector 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 +
| width="90%" | Baud Rate
 +
|-
 +
| colspan="2" | Baud rate to be used 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 +
| width="90%" | Stop Delay
 +
|-
 +
| colspan="2" | 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.  
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Simulate Comms
 +
|-
 +
| colspan="2" |  
 +
|}==Macro reference==
  
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"

Revision as of 09:57, 27 January 2023

Author Matrix TSL
Version 2.0
Category Movement Orientation


Gyroscope 3-Axis (L3G4200D) component

Interface to the L3G4200D three axis digital gyroscope. Panel GUI can be used to simulate incoming data for testing.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Macro reference

Fc9-comp-macro.png GetZ
Returns the previously sampled Z axis data 
Fc9-s16-icon.png - INT Return


Fc9-comp-macro.png GetY
Returns the previously sampled Y axis data 
Fc9-s16-icon.png - INT Return


Fc9-comp-macro.png GetX
Returns the previously sampled X axis data 
Fc9-s16-icon.png - INT Return


Fc9-comp-macro.png SampleDevice
Reads the Axis data from the device 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png ReadRegister
Read the data byte at the given address of the device 
Fc9-u8-icon.png - BYTE Reg
address of the register to be read 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png WriteRegister
Writes the data byte to the given address of the device. Returns 0 if successful 
Fc9-u8-icon.png - BYTE Reg
address of register to be written with data byte 
Fc9-u8-icon.png - BYTE Data
data byte to be written to device register 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png Initialise
Initialise the component. 
Fc9-u8-icon.png - BYTE Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png Output 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 X Axis
 
Fc9-type-16-icon.png Y Axis
 
Fc9-type-16-icon.png Z Axis
 
Fc9-type-10-icon.png Label
 
Fc9-conn-icon.png Connection
Fc9-type-16-icon.png Channel
Channel selection 
Fc9-type-5-icon.png SDA
Pin used for SDA (data signal) 
Fc9-type-5-icon.png SCL
Pin used for SCL (clock signal) 
Fc9-type-16-icon.png Baud Select
Baud rate option selector 
Fc9-type-14-icon.png Baud Rate
Baud rate to be used 
Fc9-type-7-icon.png 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.  
Fc9-conn-icon.png Simulation
Fc9-type-16-icon.png Simulate Comms
 

==Macro reference==

Fc9-comp-macro.png GetZ
Returns the previously sampled Z axis data 
Fc9-s16-icon.png - INT Return


Fc9-comp-macro.png GetY
Returns the previously sampled Y axis data 
Fc9-s16-icon.png - INT Return


Fc9-comp-macro.png GetX
Returns the previously sampled X axis data 
Fc9-s16-icon.png - INT Return


Fc9-comp-macro.png SampleDevice
Reads the Axis data from the device 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png ReadRegister
Read the data byte at the given address of the device 
Fc9-u8-icon.png - BYTE Reg
address of the register to be read 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png WriteRegister
Writes the data byte to the given address of the device. Returns 0 if successful 
Fc9-u8-icon.png - BYTE Reg
address of register to be written with data byte 
Fc9-u8-icon.png - BYTE Data
data byte to be written to device register 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png Initialise
Initialise the component. 
Fc9-u8-icon.png - BYTE Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png Output 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 X Axis
 
Fc9-type-16-icon.png Y Axis
 
Fc9-type-16-icon.png Z Axis
 
Fc9-type-10-icon.png Label
 
Fc9-conn-icon.png Connection
Fc9-type-16-icon.png Channel
Channel selection 
Fc9-type-5-icon.png SDA
Pin used for SDA (data signal) 
Fc9-type-5-icon.png SCL
Pin used for SCL (clock signal) 
Fc9-type-16-icon.png Baud Select
Baud rate option selector 
Fc9-type-14-icon.png Baud Rate
Baud rate to be used 
Fc9-type-7-icon.png 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.  
Fc9-conn-icon.png Simulation
Fc9-type-16-icon.png Simulate Comms
 

==Macro reference==

Fc9-comp-macro.png GetZ
Returns the previously sampled Z axis data 
Fc9-s16-icon.png - INT Return


Fc9-comp-macro.png GetY
Returns the previously sampled Y axis data 
Fc9-s16-icon.png - INT Return


Fc9-comp-macro.png GetX
Returns the previously sampled X axis data 
Fc9-s16-icon.png - INT Return


Fc9-comp-macro.png SampleDevice
Reads the Axis data from the device 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png ReadRegister
Read the data byte at the given address of the device 
Fc9-u8-icon.png - BYTE Reg
address of the register to be read 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png WriteRegister
Writes the data byte to the given address of the device. Returns 0 if successful 
Fc9-u8-icon.png - BYTE Reg
address of register to be written with data byte 
Fc9-u8-icon.png - BYTE Data
data byte to be written to device register 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png Initialise
Initialise the component. 
Fc9-u8-icon.png - BYTE Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png Output 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 X Axis
 
Fc9-type-16-icon.png Y Axis
 
Fc9-type-16-icon.png Z Axis
 
Fc9-type-10-icon.png Label
 
Fc9-conn-icon.png Connection
Fc9-type-16-icon.png Channel
Channel selection 
Fc9-type-5-icon.png SDA
Pin used for SDA (data signal) 
Fc9-type-5-icon.png SCL
Pin used for SCL (clock signal) 
Fc9-type-16-icon.png Baud Select
Baud rate option selector 
Fc9-type-14-icon.png Baud Rate
Baud rate to be used 
Fc9-type-7-icon.png 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.  
Fc9-conn-icon.png Simulation
Fc9-type-16-icon.png Simulate Comms
 

==Macro reference==

Fc9-comp-macro.png GetZ
Returns the previously sampled Z axis data 
Fc9-s16-icon.png - INT Return


Fc9-comp-macro.png GetY
Returns the previously sampled Y axis data 
Fc9-s16-icon.png - INT Return


Fc9-comp-macro.png GetX
Returns the previously sampled X axis data 
Fc9-s16-icon.png - INT Return


Fc9-comp-macro.png SampleDevice
Reads the Axis data from the device 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png ReadRegister
Read the data byte at the given address of the device 
Fc9-u8-icon.png - BYTE Reg
address of the register to be read 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png WriteRegister
Writes the data byte to the given address of the device. Returns 0 if successful 
Fc9-u8-icon.png - BYTE Reg
address of register to be written with data byte 
Fc9-u8-icon.png - BYTE Data
data byte to be written to device register 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png Initialise
Initialise the component. 
Fc9-u8-icon.png - BYTE Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png Output 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 X Axis
 
Fc9-type-16-icon.png Y Axis
 
Fc9-type-16-icon.png Z Axis
 
Fc9-type-10-icon.png Label
 
Fc9-conn-icon.png Connection
Fc9-type-16-icon.png Channel
Channel selection 
Fc9-type-5-icon.png SDA
Pin used for SDA (data signal) 
Fc9-type-5-icon.png SCL
Pin used for SCL (clock signal) 
Fc9-type-16-icon.png Baud Select
Baud rate option selector 
Fc9-type-14-icon.png Baud Rate
Baud rate to be used 
Fc9-type-7-icon.png 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.  
Fc9-conn-icon.png Simulation
Fc9-type-16-icon.png Simulate Comms