Driver for the Freescale MPL3115A2 barometric pressure/temperature/altimeter board connected via I2C.
Go to file
Renovate Bot 7da702024e
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
chore(deps): update dependency mimic to v1.9.0
2024-07-18 20:24:06 +12:00
config chore: migrate to local (#23) 2024-02-14 15:52:35 +13:00
lib chore: migrate to local (#23) 2024-02-14 15:52:35 +13:00
test Switch to Wafer. 2020-01-23 17:30:48 +13:00
.drone.yml chore: fix docs release. 2024-03-14 19:26:45 +13:00
.formatter.exs Empty mix application. 2019-10-07 13:04:11 +13:00
.gitignore Empty mix application. 2019-10-07 13:04:11 +13:00
.tool-versions chore(deps): update dependency erlang to v27.0.1 2024-07-11 01:33:14 +12:00 chore: release version v1.0.1 2024-02-23 20:19:17 +13:00 chore!: Relicense to HL3-FULL. 2023-01-17 11:03:54 +13:00
mix.exs chore(deps): update dependency ex_check to ~> 0.16 2024-03-01 23:22:10 +13:00
mix.lock chore(deps): update dependency mimic to v1.9.0 2024-07-18 20:24:06 +12:00 chore: fix typo in readme 2024-03-08 14:46:26 +13:00
renovate.json chore: Configure Renovate (#24) 2024-02-14 17:42:26 +13:00


Build Status Hippocratic License HL3-FULL

Elixir driver for the MPL3115A2 barometric pressure, altitude and temperature sensor. I'm using Adafruit's breakout.


Add your device to your config like so:

config :mpl3115a2,
  devices: [%{bus: "i2c-1", address: 0x60}]

And start your application. Your devices will be reset with defaults and you will be able to take temperature and pressure or altitude readings. See MPL3115A2.Commands.initialize!/1 for more details on the default initialization.

This device is capable of much more advanced usage than the MPL3115A2.Device module makes use of. It was all that I needed at the time. For advanced usage you can use the MPL3115A2.Commands and MPL3115A2.Registers modules directly. Feel free to send PR's.


If available in Hex, the package can be installed by adding mpl3115a2 to your list of dependencies in mix.exs:

def deps do
    {:mpl3115a2, "~> 1.0.1"}

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at

Github Mirror

This repository is mirrored on Github from it's primary location on my Forgejo instance. Feel free to raise issues and open PRs on Github.


This software is licensed under the terms of the HL3-FULL, see the file included with this package for the terms.

This license actively proscribes this software being used by and for some industries, countries and activities. If your usage of this software doesn't comply with the terms of this license, then contact me with the details of your use-case to organise the purchase of a license - the cost of which may include a donation to a suitable charity or NGO.