Git Product home page Git Product logo

bmp388_dev_i2c's Introduction

BMP388_DEV_I2C

Thanks to MartinL1 for this library. I was having issues using it with my STM32 blackpill, so I simply shaved down the parts that I didn't need/that could be causing problems. THIS LIBRARY DOES NOT DO SPI, nor does it allow you to set custom SCL and SDA pins.

An Arduino compatible, non-blocking, I2C library for the Bosch BMP388 barometer.

alt text

© Copyright, image courtesy of Adafruit Industries lisensed under the terms of the Create Commons Attribution-ShareAlike 3.0 Unported.

This BMP388_DEV library offers the following features:

  • Returns temperature in degrees celius (°C), pressure in hectoPascals/millibar (hPa) and altitude in metres (m)
  • NORMAL or FORCED modes of operation
  • I2C or hardware SPI communications with configurable clock rates
  • Non-blocking operation
  • In NORMAL mode barometer returns results at the specified standby time interval
  • Highly configurable, allows for changes to pressure and temperature oversampling, IIR filter and standby time
  • Polling or interrupt driven measurements (using the BMP388's external INT pin)
  • Storage and burst reading of up to 72 temperature and pressure measurements using the BMP388's internal 512 byte FIFO memory

Version

  • Version 1.0.2 -- Modification to allow user-defined pins for I2C operation on the ESP32
  • Version 1.0.1 -- Fix uninitialised structures, thanks to David Jade for investigating and flagging up this issue
  • Version 1.0.0 -- Intial version

Arduino Compatibility

  • All Arduino boards, but for 5V Arduino boards (such as the Uno, Nano, Mega, Leonardo, etc...), please check if the BMP388 breakout board requires a 5V to +3.3V voltage level shifter

Installation

The BMP388_DEV library can be installed using the Arduino IDE's Library Manager. To access the Library Manager, in the Arduino IDE's menu select Sketch->Include Library->Manage Libraries.... In the Library Manager's search bar type BMP388 then select the "Install" button in the BMP388_DEV entry.

Alternatively simply download BMP388_DEV from this Github repository, un-zip or extract the files and place the BMP388_DEV directory in your .../Arduino/libraries/... folder. The .../Arduino/... folder is the one where your Arduino IDE sketches are usually located.

Usage

BMP388_DEV Library

Simply include the BMP388_DEV.h file at the beginning of your sketch:

#include <BMP388_DEV.h>

For I2C communication the BMP388_DEV object is created (instantiated) without any parameters:

BMP388_DEV bmp388;	// Set up I2C communications

By default the library uses the BMP388's I2C address 0x77. (To use the alternate I2C address: 0x76, see the begin() function below.

By default the I2C runs in fast mode at 400kHz. However it is possible to change the I2C clock speed using the set clock function:

Check out the readme in MartinL1's original library for further explanations (I removed them from here because they are no longer accurate)

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.