Espruino and BMP180 example

159

The BMP180 is the new digital barometric pressure sensor of Bosch Sensortec, with a very high performance, which enables applications in advanced mobile devices, such as smartphones, tablet PCs and sports devices. It follows the BMP085 and brings many improvements, like the smaller size and the expansion of digital interfaces.
The ultra-low power consumption down to 3 μA makes the BMP180 the leader in power saving for your mobile devices. BMP180 is also distinguished by its very stable behavior (performance) with regard to the independency of the supply voltage.

Applications
– Indoor navigation
– GPS-enhancement for dead-reckoning, slope detection, etc.
– Sport devices, e.g. altitude profile
– Weather forecast
– Vertical velocity indication (rise/sink speed)

 

Schematic and Connection

 

 

Code

 

 

I2C1.setup({scl:B6,sda:B7});
var bmp = require("BMP085").connect(I2C1);
 
setInterval(function() {
bmp.getPressure(function(d) {
console.log("Pressure: " + d.pressure + " Pa");
console.log("Temperature: " + d.temperature + " C");
});
}, 1000);

 

 

 

Output
Temperature: 22.925 C
Pressure: 101658 Pa
Temperature: 23.3 C
Pressure: 101668 Pa
Temperature: 26.09375 C
Pressure: 101680 Pa
Temperature: 27.93125 C
Pressure: 101680 Pa
Temperature: 29.0375 C
Pressure: 101674 Pa
Temperature: 29.81875 C
Pressure: 101672 Pa
Temperature: 30.15625 C
Pressure: 101680 Pa
Temperature: 29.7875 C
Links

https://www.espruino.com/BMP085

gy-68 Digital Barometric Pressure Sensor Board Module Replace BMP085 BMP180

Share