GithubHelp home page GithubHelp logo

websnik / bme280 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sylaina/bme280

0.0 1.0 0.0 47 KB

Using BME280 sensor from Bosch at AVR mikrocontrollers like Atmega328p

License: GNU General Public License v3.0

Makefile 41.33% C 58.67%

bme280's Introduction

# bme280
Using BME280 sensor from Bosch at AVR mikrocontrollers like Atmega328p

This Library allowed you to use BME280 to sense temperature, pressure and humidity with AVR microcontroller like Atmega328.
For communication with the BME280 I'll use my own I2C library (settings for I2C in i2c.h).

Default settings for sensor are:

standby-time: 250 ms
iir-filter: 8x
temperature oversampling: 16x
pressure oversampling: 16x
mode: normal

If you want to change this settings edit bme280.h (look at /* TODO:...).


examble source-code:

/*************BME280 examble*************/
#include <stdlib.h>
#include "bme280.h"

int main(void){
  // variables for sensor values
  float temperature = 0.0;
  float pressure = 0.0;
  float humidity = 0.0;
  
  // init sensor
  bme280_init();
  // read values
  temperature = bme280_readTemperature(); // in °C
  pressure = bme280_readPressure()/100.0; // in mbar
  humidity = bme280_readHumidity(); // in %
  
  for(;;){
    // main-loop
  }
  return 0; // never reached
}

For Arduino-Users:

Remember that this library is a c-library. Type

extern "C"{
  #include "lcd.h"
}

for include.

bme280's People

Contributors

sylaina avatar

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.