Python library for MS5803-14BA pressure sensor for Raspberry Pi
Python 3 library for MS5803-14BA pressure sensor for Raspberry Pi
Based off of the Adafruit Arduino Library and the Control Everything Python Library. Some of the math is complicated when correcting raw readings to actual temperatures and pressures, that math can be verified from the MS5803-14BA datasheet.
This should be on pypi soon, and so you can install on your RPi using
pip3 install ms5803py
The MS5803 and the RPi use the I2C protocol to communicate, so you need to have I2C set up on your pi, as explained in this Adafruit tutorial. After that, the MS5803 needs to be hooked up to the Raspberry Pi as described in this Adafruit tutorial.
After doing that, you must find the I2C address of your MS5803. To do this, run the following command both before and after plugging in the MS5803. Whatever address shows up is the one you want:
sudo i2cdetect -y 1
It should be either
0x77, as described in the MS5803-14BA datasheet, depending on if the CSB (Chip Select) pin on the MS5803 is high or low. On the Sparkfun breakout board the I2C address is
0x76, so I have that set as the default if you don't specify an address when initializing the sensor.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size & hash SHA256 hash help||File type||Python version||Upload date|
|ms5803py-0.1.4-py3-none-any.whl (3.7 kB) Copy SHA256 hash SHA256||Wheel||py3||Jul 31, 2018|
|ms5803py-0.1.4.tar.gz (3.4 kB) Copy SHA256 hash SHA256||Source||None||Jul 31, 2018|