Giter Site home page Giter Site logo

lps35hw's Introduction

LPS35HW pressure sensor library (I2C)

build Framework Badge Arduino

Fully compatible with following barometers

  • LPS22HB
  • LPS33W
  • LPS33HW

This library works with metric units, if you need imperial please consider using MeteoFunctions library, please see example below.

#include <Wire.h>
#include "LPS35HW.h"
#include "MeteoFunctions.h"

LPS35HW lps;
MeteoFunctions calc;

const float above_sea = 1000;  // ft

void setup() {
    Serial.begin(9600);
    Serial.println("LPS barometer test");

    if (!lps.begin()) {
        Serial.println("Could not find a LPS barometer, check wiring!");

        while (1) {}
    }
}

void loop() {
    float pressure = lps.readPressure();
    float temp = calc.c_f(lps.readTemp());

    Serial.print("Pressure: ");
    Serial.print(calc.relativePressure_f(pressure, above_sea, temp));
    Serial.print("inHg\ttemperature: ");
    Serial.print(temp);
    Serial.println("*F\n");

    delay(1000);
}

lps35hw's People

Contributors

pilotak avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

lesuedois bonn

lps35hw's Issues

Double quotes/angle brackets in include

Please note that the LPS35HW library located @ https://github.com/pilotak/LPS35HW cannot compile since neither includes "LPS35HW.h" nor "MeteoFunctions.h" and their associated CPP files appear to exist anywhere that I can find. These included header files are quoted instead of being in brackets and hence are apparently not part of the normal Arduino IDE library. Thank you.

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.