Difference between revisions of "Component: Magnetometer 3-Axis (QMC5883L) (Movement Orientation)"
From Flowcode Help
Jump to navigationJump to search| Line 76: | Line 76: | ||
{{Fcfile|QMC5883L.fcfx|QMC5883L Demo}} | {{Fcfile|QMC5883L.fcfx|QMC5883L Demo}} | ||
| + | |||
| + | |||
| Line 81: | Line 83: | ||
==Macro reference== | ==Macro reference== | ||
| + | ===Read_Register=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 99: | Line 102: | ||
| + | ===Write_Register=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 122: | Line 126: | ||
| + | ===UpdateCompassData=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 135: | Line 140: | ||
| + | ===CollectXYZData=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 153: | Line 159: | ||
| + | ===SimSetCompass=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 181: | Line 188: | ||
| + | ===Read_Bearing=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 199: | Line 207: | ||
| + | ===Initialise=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Revision as of 11:51, 3 February 2023
| Author | Matrix TSL |
| Version | 1.6 |
| Category | Movement Orientation |
Contents
Magnetometer 3-Axis (QMC5883L) component
QMC5883L 3-Axis Magnetometer sensor Useful for working out data such as compass orientation.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Magnetometer_QMC5883.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Magnetometer_QMC5883.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Here is a very simple demonstration on how to use the sensor to read X, Y, Z magnetometer data from the sensor.
Macro reference
Read_Register
| Read_Register | |
| Reads a value from a register on the accelerometer. | |
| Reg | |
| Return | |
Write_Register
| Write_Register | |
| Writes a data value to a specific register on the accelerometer | |
| Reg | |
| Data | |
| Return | |
UpdateCompassData
| UpdateCompassData | |
| Reads from the compass and updates the local XYZ variables. Returns 1 for new data and 0 for no new data | |
| Return | |
CollectXYZData
SimSetCompass
| SimSetCompass | |
| Allows the XYZ slider values to be set via the simulation | |
| X | |
| Y | |
| Z | |
| Return | |
Read_Bearing
Initialise
| Initialise | |
| Sets up up the communication bus and initialises the accelerometer module. | |
| Return | |