App Inventor Extensions: Magnetic | Pura Vida Apps

App Inventor Extensions


Magnetic Sensor Extension

See the App Inventor Extensions document about how to use an App Inventor Extension.

For questions about this extension or bug reports please start a new thread in the App Inventor community. Thank you.

For feature requests please contact me by email. To be a sponsor of a new method already is possible starting from only 10 USD! With your contribution you will help the complete App Inventor community. Thank you.

April 1st, 2016: Version 1 of the Magnetic Sensor Extension released for App Inventor version ai2extensions7 and Companion version 236.cdk1.

Aug 11th, 2016: Version 1a: avoid DX execution failed error: build each extension separately

Description

Magnetic Sensor component.
Required permissions: none
Thank you Selorm for being the sponsor of this extension.

Properties


Returns whether sensor is available.


Returns whether sensor is enabled.


Specifies whether sensor is enabled.


Returns the X (northward) component of the magnetic field in microteslas (10^-6). To return meaningful values the sensor must be enabled.


Returns the Y (eastward) component of the magnetic field in microteslas (10^-6). To return meaningful values the sensor must be enabled.


Returns the Z (downward) component of the magnetic field in microteslas (10^-6). To return meaningful values the sensor must be enabled.


Returns the absolute field strength using the formula SQRT(X*X+Y*Y+Z*Z). To return meaningful values the sensor must be enabled.

Events


Event indicating that a sensor change occurred.

Example App: Magnetic Sensor Test

Test

Tested successfully on Nexus 5 running Android 6.0.1.

For questions about App Inventor,
please ask in the App Inventor community.Thank you.

Terms and Conditions

Download


Developing and maintaining snippets, tutorials and extensions for App Inventor takes a lot of time.
I hope it saved some of your time. If yes, then you might consider to donate a small amount!

Donation amount:

or donate some mBTC to Bitcoin Address:
1Jd8kXLHu2Vkuhi15TWHiQm4uE9AGPYxi8
Bitcoin

Thank you! Taifun
 

Download TaifunMagnetic extension (aix file)
Download Magnetic Sensor Test (aia file)
Back to top of page ...

Creative Commons License
This work by Pura Vida Apps is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License
with attribution (name=Pura Vida Apps and link to the source site) required.


Home | Snippets | Tutorials | Extensions | Links | Search | Privacy Policy | Contact