Home CodeEspruino Espruino and BMP280 example

Espruino and BMP280 example

by shedboy71

BMP280 is an absolute barometric pressure sensor especially designed for mobile applications. The sensor module is housed in an extremely compact package. Its small dimensions and its low power consumption allow for the implementation in battery powered devices such as mobile phones, GPS modules or watches.
As its predecessor BMP180, BMP280 is based on Bosch’s proven Piezo-resistive pressure sensor technology featuring high accuracy and linearity as well as long term stability and high EMC robustness. Numerous device operation options offer highest flexibility to optimize the device regarding power consumption, resolution and filter performance. A tested set of default settings for example use case is provided to the developer in order to make design-in as easy as possible.


– Enhancement of GPS navigation (e.g. time-tofirst-fix improvement, dead-reckoning, slope detection)
– Indoor navigation (floor detection, elevator detection)
– Outdoor navigation, leisure and sports applications
– Weather forecast
– Health care applications (e.g. spirometry)
– Vertical velocity indication (e.g. rise/sink speed)






[codesyntax lang=”javascript”]

var bme = require("BME280").connect(I2C1);


var temp_cal = bme.calibration_T(bme.temp_raw);
var press_cal = bme.calibration_P(bme.pres_raw);
var temp_act = temp_cal / 100.0;
var press_act = press_cal / 100.0;

console.log("Pressure: " + press_act + " hPa");
console.log("Temperature: " + temp_act + " C");



Pressure: 1016.73902477584 hPa
Temperature: 25.34128807298 C



1PCS BME280 Digital Sensor Temperature Humidity Barometric Pressure Sensor


You may also like