adafruit_tlv493d
¶
CircuitPython helper library for the TLV493D 3-axis magnetometer
- Author(s): Bryan Siepert
Implementation Notes¶
Hardware:
- Adafruit TLV493D Triple-Axis Magnetometer
Software and Dependencies:
- Adafruit CircuitPython firmware for the supported boards: https://circuitpython.org/downloads
- Adafruit’s Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
-
class
adafruit_tlv493d.
TLV493D
(i2c_bus, address=94, addr_reg=0)¶ Driver for the TLV493D 3-axis Magnetometer.
Parameters: Quickstart: Importing and using the device
Here is an example of using the
TLV493D
class. First you will need to import the libraries to use the sensorimport board import adafruit_tlv493d
Once this is done you can define your
board.I2C
object and define your sensor objecti2c = board.I2C() # uses board.SCL and board.SDA tlv = adafruit_tlv493d.TLV493D(i2c)
Now you have access to the
magnetic
attributeacc_x, acc_y, acc_z = tlv.magnetic
-
magnetic
¶ The processed magnetometer sensor values. A 3-tuple of X, Y, Z axis values in microteslas that are signed floats.
-