GithubHelp home page GithubHelp logo

patrickelectric / bluerobotics_ms5837_library Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bluerobotics/bluerobotics_ms5837_library

0.0 1.0 0.0 28 KB

Arduino library for the MS5837 pressure sensor.

License: MIT License

C++ 100.00%

bluerobotics_ms5837_library's Introduction

BlueRobotics MS5837 Library Build Status

Arduino library for the MS5837 pressure sensor. The MS5837 is a tiny SMT pressures sensor from Measurement Specialties that can measure pressure of up to 30 Bar (300m depth) with resolution of 0.2 mbar.

This library also supports the MS5837-02BA which has a much smaller measurement range and is better suited for altitude measurement in air.

Documentation

Please see the examples for normal operation. Below are the available functions used in the library.

MS5837();

/** Must be called before attempting to operate the sensor.
 * Returns true if the sensor was initialized successfully.
 */
bool init();

/** Set model of MS5837 sensor. Valid options are MS5837::MS5837_30BA (default)
 * and MS5837::MS5837_02BA.
 */
void setModel(uint8_t model);

/** Provide the density of the working fluid in kg/m^3. Default is for 
 * seawater. Should be 997 for freshwater.
 */
void setFluidDensity(float density);

/** The read from I2C takes up for 40 ms, so use sparingly is possible.
 */
void read();

/** Pressure returned in mbar or mbar*conversion rate.
 */
float pressure(float conversion = 1.0f);

/** Temperature returned in deg C.
 */
float temperature();

/** Depth returned in meters (valid for operation in incompressible
 *  liquids only. Uses density that is set for fresh or seawater.
 */
float depth();

/** Altitude returned in meters (valid for operation in air only).
 */
float altitude();

Versions

1.0.0 - First release, included in Arduino Library Manager

Reference

You can find the MS5837-30BA datasheet here.

bluerobotics_ms5837_library's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.