Write code interact with an LIS3MDL over I2C. Using an external library is fine for this (See MMFS's dependency on SparkFun's GNSS v3 library and our MAX-M10s's implementation of it as an example).
The sensor will need an int() method to establish communication and set up configuration, and a read() that reads the registers and updates the appropriate variables.
These classes should be pretty simple and most of the work will come in either determining what to write to the registers or which library to use to write to the registers for us.
Write code interact with an LIS3MDL over I2C. Using an external library is fine for this (See MMFS's dependency on SparkFun's GNSS v3 library and our MAX-M10s's implementation of it as an example).
The sensor will need an int() method to establish communication and set up configuration, and a read() that reads the registers and updates the appropriate variables.
These classes should be pretty simple and most of the work will come in either determining what to write to the registers or which library to use to write to the registers for us.