Difference between revisions of "Component: Magnetometer (SM324) (Movement Orientation)"
From Flowcode Help
Jump to navigationJump to searchLine 73: | Line 73: | ||
''<span style="color:red;">No additional examples</span>'' | ''<span style="color:red;">No additional examples</span>'' | ||
+ | |||
+ | |||
Line 79: | Line 81: | ||
==Macro reference== | ==Macro reference== | ||
+ | ===ReadStatus=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 92: | Line 95: | ||
+ | ===WriteMemory=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 115: | Line 119: | ||
+ | ===RequestData=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 128: | Line 133: | ||
+ | ===ReadTemperatureRaw=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 141: | Line 147: | ||
+ | ===ReadMagneticFieldRaw=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 154: | Line 161: | ||
+ | ===ReadMagneticFieldReal=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 167: | Line 175: | ||
+ | ===SetAddress=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 190: | Line 199: | ||
+ | ===WriteCommand=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 208: | Line 218: | ||
+ | ===ReadTemperatureReal=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 221: | Line 232: | ||
+ | ===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.0 |
Category | Movement Orientation |
Contents
Magnetometer (SM324) component
SM324 ultraprecise 24-bit smart magnetometer capable of distance measurement using a magnet. Controlled via I2C bus communications.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Magnetometer_SM324.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Magnetometer_SM324.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
ReadStatus
![]() |
ReadStatus |
Reads the status byte from the sensor IC. Bit 6 = Voltage OK Bit 5 = Busy Bit 2 = Memory Error Bit 0 = Saturation | |
![]() |
Return |
WriteMemory
![]() |
WriteMemory |
Writes a 16-bit value to the specified memory location | |
![]() |
Address |
Internal memory address | |
![]() |
Value |
![]() |
Return |
RequestData
![]() |
RequestData |
Requests temperature and magnetic data from the device, returns status. Bit 6 = Voltage OK Bit 5 = Busy Bit 2 = Memory Error Bit 0 = Saturation | |
![]() |
Return |
ReadTemperatureRaw
![]() |
ReadTemperatureRaw |
Reads the temperature from the last succesful data read. | |
![]() |
Return |
ReadMagneticFieldRaw
![]() |
ReadMagneticFieldRaw |
Reads the magnetic field from the last succesful data read. | |
![]() |
Return |
ReadMagneticFieldReal
![]() |
ReadMagneticFieldReal |
Reads the magnetic field from the last succesful data read as a float in Oersted Oe. | |
![]() |
Return |
SetAddress
WriteCommand
![]() |
WriteCommand |
Sends a command to the sensor IC. | |
![]() |
Command |
![]() |
Return |
ReadTemperatureReal
![]() |
ReadTemperatureReal |
Reads the temperature from the last succesful data read as an float in degrees C. | |
![]() |
Return |
Initialise
![]() |
Initialise |
Sets up the I2C bus ready to communicate with the sensor IC. Sets the address variable back to the Address property value. | |
![]() |
Return |