BME280 - Mongoose OS Documentation

  • Products
    Mongoose OS IoT firmware development framework
    Mongoose Web Server Embedded HTTP/Websocket/MQTT library for C/C++
    VCON MCU module with OTA and management dashboard
    mDash IoT Cloud Platform
  • Pricing
  • Company
    About us who we are
    Powered by Mongoose OS devices and appliances powered by Mongoose OS
    Case Studies Read our customers' case studies
    Testimonials Hear what our customers say
    Our partners proud to partner with
    Contact our address, phone, email
  • Developers
    Downloads & Docs downloads, docs, API reference
    Starter kits devboards and tutorials
    Forum ask questions, get answers
    Chat community chat
    mDash login
    Quick Start
    • Quick Start
    • Develop in C/C++
    • Develop in JavaScript
    • IDE support
    • Supported hardware
    Cloud Tutorials
    • Amazon AWS IoT
    • Google IoT Core
    • IBM Watson
    • Microsoft Azure IoT
    • Private MQTT server
    • Samsung Artik
    User Guide
    • Introduction
    • RPC mechanism
    • Device config
    • Build Process
    • Debugging
    • OTA updates
    • Security
    • mos tool reference
    • Licensing
    API Reference
      Core
      • ADC
      • App
      • Bitbang
      • Config
      • Debug (UART)
      • Event
      • GPIO
      • I2C
      • JSON
      • Logging
      • Membuf
      • Net events
      • Onewire
      • PWM
      • SPI
      • String
      • System
      • Time
      • Timers
      • UART
      • Utils
      • mgos_file_utils.h
      • mgos_iram.h
      Cloud services
      • Amazon IoT
      • Blynk
      • Google IoT Core
      • IBM Watson
      • Microsoft Azure RPC
      • Miscrosoft Azure IoT
      • Prometheus metrics
      • mDash dashboard
      Networking
      • BLE Current Time Service
      • BLE
      • Common CA certificates
      • Config over BLE GATT
      • DNS-SD
      • Debug over BLE GATT
      • Device Shadow
      • Ethernet
      • HTTP server
      • IR (infrared)
      • MQTT
      • Mongoose network lib
      • OTA via HTTP GET
      • OTA via HTTP POST
      • OTA via device shadow
      • PPPoS
      • SNTP
      • WiFi
      Drivers
      • ADS1X1X I2C
      • ADS7843/XPT2046 SPI
      • APDS9960 I2C
      • ATCA
      • BH1730 sensor
      • BME280/BMP280
      • BQ27421
      • Barometers
      • Bosch BM222
      • CCS811 I2C
      • DHT
      • DS3231 I2C
      • Dallas RMT
      • ESP32 touch sensor
      • HTU21D(F) I2C
      • ILI9341 SPI
      • IMU
      • INA219 I2C
      • INA226 I2C
      • INA3221 I2C
      • Inventek ISM43xxx WiFi
      • MAX7219 I2C
      • MAX72xx LED matrix
      • MCP23XXX I2C
      • MCP9808 I2C
      • MQ135 gas sensor
      • Neopixel
      • Onewire RMT
      • PCF857X I2C
      • SHT31 I2C
      • SSD1306 OLED
      • STMPE610 SPI
      • Si7005 sensor
      • Si7021 I2C
      • TI TMP006 temp sensor
      • VEML6075 I2C
      • VFS (LittleFS)
      • VFS (RAM)
      • VFS (SPI NOR Flash)
      • VFS (SPIFFS)
      • VFS (Winbond W25XXX)
      • VFS (another device)
      • VFS (encryption)
      • VFS
      • bh1750 I2C
      Arduino compat
      • Adafruit ADS1015
      • Adafruit HTU21D-F
      • Adafruit PWM servo
      • Adafruit TSL2561
      • Adafuit GFX
      • Adafuit SSD1306
      • Arduino compatibility
      • BME280
      • DS3231 RTC
      • Dallas Temperature
      • Onewire
      • Parola for MAX 7219
      • SPI
      • VL53L0X
      • Wire
      RPC
      • RPC core
      • RPC loopback
      • RPC over BLE GATT
      • RPC over MQTT
      • RPC over UART
      • RPC over UDP
      • Service - ATCA
      • Service - Config
      • Service - Cron
      • Service - FS
      • Service - GATT client
      • Service - GPIO
      • Service - I2C
      • Service - OTA
      • Service - WiFi
      Misc
      • Cron
      • Crontab
      • Device Provisioning
      • Device location (lat/lon)
      • Devtab/Fstab
      • File logger
      • JSON store
      • MJS JavaScript engine
      • Miniz compression
      • Sensor utilities
      • WebUI
      • bme680
      • bmp-loader
      • boards
      • ds18b20
      • freertos
      • lolin-button
      • lwip
      • mbedtls
      • mdash-api
      • prometheus-sensors
      • rpc-gcp
    HOWTOs
    • List RPC services
    • Get device info
    • Add filesystem
    • MakerFactory ESP32 board
    • Add FS with content
    • Send data to spreadsheet
BME280
Github Repo C Header C source JS source
mongoose-os-libs/arduino-adafruit-bme280 Adafruit_BME280.h api_arduino_bme280.js

readS16_LE

int16_t readS16_LE(byte reg); // little endian

little endian

JS API

Adafruit_BME280.createI2C

Adafruit_BME280.createI2C(i2caddr)

Create a BME280 instance on I2C bus with the given address i2caddr. Return value: an object with the methods described below.

Adafruit_BME280.createSPI

Adafruit_BME280.createSPI(cspin)

Create a BME280 instance on SPI bus with the given Chip Select pin cspin. Return value: an object with the methods described below.

Adafruit_BME280.createSPIFull

Adafruit_BME280.createSPIFull(cspin, mosipin, misopin, sckpin)

Create a BME280 instance on SPI bus with the given pins cspin, mosipin, misopin, sckpin. Return value: an object with the methods described below.

myBME.close

myBME.close()

Close Adafruit_BME280 instance; no methods can be called on this instance after that. Return value: none.

myBME.takeForcedMeasurement

myBME.takeForcedMeasurement()

Take a new measurement (only possible in forced mode).

myBME.readTemperature

myBME.readTemperature()

Return the temperature from the sensor in degrees C or Adafruit_BME280.RES_FAIL in case of a failure.

myBME.readPressure

myBME.readPressure()

Returns the pressure from the sensor in hPa or Adafruit_BME280.RES_FAIL in case of a failure.

myBME.readHumidity

myBME.readHumidity()

Returns the humidity from the sensor in %RH or Adafruit_BME280.RES_FAIL in case of a failure.

myBME.readAltitude

myBME.readAltitude(seaLevel)

Returns the altitude in meters calculated from the specified sea-level pressure seaLevel (in hPa) or Adafruit_BME280.RES_FAIL in case of a failure. http://www.adafruit.com/datasheets/BST-BMP180-DS000-09.pdf, P.16

myBME.seaLevelForAltitude

myBME.seaLevelForAltitude(alt, pres)

Returns the pressure at sea level in hPa calculated from the specified altitude alt (in meters), and atmospheric pressure pres (in hPa) or Adafruit_BME280.RES_FAIL in case of a failure. http://www.adafruit.com/datasheets/BST-BMP180-DS000-09.pdf, P.17

edit this doc

CONTACTS

  • Cesanta, 13 Edward Place, Bloomfield Ave, Dublin 4, Ireland
  • +353 1 592 5476
  • [email protected]

ABOUT

  • About Us
  • Licensing
  • Contact Us
  • Privacy Policy
  • Terms of Service

DEVELOPERS

  • Features
  • Documentation
  • Technical Guides
  • Forum
  • Chat

SOCIAL

Thank You
Close

Tag » Arduino Adafruit_bme280.h