Component: Magnetometer (SM324) (Movement Orientation)
From Flowcode Help
(Redirected from Component: ID e4f1697e 5571 475a a2b1 aa7243920422)
Jump to navigationJump to searchAuthor | 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
Initialise
Initialise | |
Sets up the I2C bus ready to communicate with the sensor IC. Sets the address variable back to the Address property value. | |
- VOID | Return |
ReadMagneticFieldRaw
ReadMagneticFieldRaw | |
Reads the magnetic field from the last succesful data read. | |
- LONG | Return |
ReadMagneticFieldReal
ReadMagneticFieldReal | |
Reads the magnetic field from the last succesful data read as a float in Oersted Oe. | |
- LONG | Return |
ReadStatus
ReadStatus | |
Reads the status byte from the sensor IC. Bit 6 = Voltage OK Bit 5 = Busy Bit 2 = Memory Error Bit 0 = Saturation | |
- BYTE | Return |
ReadTemperatureRaw
ReadTemperatureRaw | |
Reads the temperature from the last succesful data read. | |
- LONG | Return |
ReadTemperatureReal
ReadTemperatureReal | |
Reads the temperature from the last succesful data read as an float in degrees C. | |
- FLOAT | 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 | |
- BYTE | Return |
SetAddress
WriteCommand
WriteCommand | |
Sends a command to the sensor IC. | |
- BYTE | Command |
- VOID | Return |
WriteMemory
WriteMemory | |
Writes a 16-bit value to the specified memory location | |
- BYTE | Address |
Internal memory address | |
- UINT | Value |
- VOID | Return |