This is a basic driver for periodic measurements with the MPL3115A2 sensor connected to a Thunderboard Sense 2 ( BRD4166A, EFR32MG12) board.
This is a basic driver for periodic measurements with the MPL3115A2 sensor connected to a Thunderboard Sense 2 (BRD4166A, EFR32MG12) board.
I developed and tested in the Simplicity Studio IDE. I started with the soc-thunderboard project, then I removed the unnecessary parts and modified it for the MPL3115A2 sensor.
I logged some useful debug information and the measurements to the VCOM:
In the Altitude mode I can read the altitude in meter and the temperature in Celsius degree from the sensor:
In the Barometer mode I can read the pressure in Pascal and the temperature in Celsius degree from the sensor: