adafruit_mlx90393

This is a breakout for the Adafruit MLX90393 magnetometer sensor breakout.

  • Author(s): ktown

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_mlx90393.MLX90393(i2c_bus, address=12, gain=7, debug=False)

Driver for the MLX90393 magnetometer. :param i2c_bus: The busio.I2C object to use. This is the only required parameter. :param int address: (optional) The I2C address of the device. :param int gain: (optional) The gain level to apply. :param bool debug: (optional) Enable debug output.

display_status()

Prints out the content of the last status byte in a human-readble format.

gain

Gets the current gain setting for the device.

last_status

Returns the last status byte received from the sensor.

magnetic

The processed magnetometer sensor values. A 3-tuple of X, Y, Z axis values in microteslas that are signed floats.

read_data

Reads a single X/Y/Z sample from the magnetometer.

read_reg(reg)

Gets the current value of the specified register.

reset()

Performs a software reset of the sensor.