Skip to content

mpl3115a2 i2c altimeter example is returning -100m for me #622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
peterharperuk opened this issue Mar 3, 2025 · 1 comment
Open

mpl3115a2 i2c altimeter example is returning -100m for me #622

peterharperuk opened this issue Mar 3, 2025 · 1 comment
Assignees

Comments

@peterharperuk
Copy link
Contributor

The temperature looks ok but the altitude looks wrong. Needs some study.

@peterharperuk peterharperuk self-assigned this Mar 3, 2025
@peterharperuk peterharperuk changed the title mpl3115a2 altimeter example is returning -100m for me mpl3115a2 i2c altimeter example is returning -100m for me Mar 3, 2025
@lurch
Copy link
Contributor

lurch commented Mar 4, 2025

https://learn.adafruit.com/using-mpl3115a2-with-circuitpython/circuitpython says "To make the altitude calculation more accurate you'll want to set the pressure at sea level for your current location and weather conditions. Barometric pressure sensors can only calculate altitude based on the pressure of air they detect and that pressure changes daily and with weather conditions."
The example Adafruit Python code has a sealevel_pressure calibration, which appears to be missing from https://github.com/raspberrypi/pico-examples/blob/develop/i2c/mpl3115a2_i2c/mpl3115a2_i2c.c

badMOS-BITSian added a commit to badMOS-BITSian/pico-examples that referenced this issue Apr 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants