Jump to content

Component: Accel / Mag 6-Axis (EBM015) (EBM Modules)

From Flowcode Help
Revision as of 14:36, 13 July 2026 by SteveT (talk | contribs) (Text replacement - "style="background-color:#EAE1EA; color:#4B008D;"" to "class="mtx-class-propfolder"")
Author Matrix TSL
Version 2.0
Category EBM Modules


Accel / Mag 6-Axis component

EBM015 Combined 6-Axis Accelerometer and Magnetometer sensors Useful for working out data such as Pitch and Yaw.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

Sample program using the EBM015 - Magnetometer sensor.

Reads either the accelerometer or compass data and displays on the LCD.

EBM015 Example







Macro reference

CollectXYZData

CollectXYZData
Collect the data from the local accelerometer buffers. The Axis parameter specifies the Axis to be read. 0 / 'x' / 'X' - X axis 1 / 'y' / 'Y' - Y axis 2 / 'z' / 'Z' - Z axis 
- BYTE Axis
 
- INT Return


Initialise

Initialise
Sets up up the communication bus and initialises the accelerometer module. Returns 0 for success and > 0 for fail. 
- BYTE Return


SimReset1G

SimReset1G
 
- VOID Return


SimSetAccelerometer

SimSetAccelerometer
Allows the XYZ slider values to be set via the simulation 
- INT X
 
- INT Y
 
- INT Z
 
- VOID Return


SimSetCompass

SimSetCompass
Allows the XYZ slider values to be set via the simulation 
- INT X
 
- INT Y
 
- INT Z
 
- VOID Return


UpdateAccelerometerData

UpdateAccelerometerData
Reads from the accelerometer and updates the local XYZ variables. Returns 1 for new data and 0 for no new data 
- BYTE Return


UpdateCompassData

UpdateCompassData
Reads from the compass and updates the local XYZ variables. Returns 1 for new data and 0 for no new data 
- BYTE Return


Property reference

Properties
Sensor Options
Power Mode
 
Accel Data Rate
 
Accel Scale
 
Compass Data Rate
 
Compass Scale
 
Comms Mode
Specifies the communications mode. Interrupt - Wait for the interrupt pin to go high before allowing new data to be sampled. Polling - New data is sampled without needing to check the interrupt pin. 
Bit Depth
 
Connections
Channel
Channel selection 
Baud Select
Baud rate option selector 
Baud Rate
Baud rate to be used 
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.  
SCL
Pin used for SCL (clock signal) 
SDA
Pin used for SDA (data signal) 
Interrupt Pin
 
Simulation
Simulate Comms
Controls how the simulation data is generated, via the component GUI or via a I2C injector.