ESP8266 + digital + BMP180 barometer Wemos D1 Mini [Full Guide]


In this tutorial we will learn how to make a digital barometer with a BMP180 (successor BMP085) and a ESP8266. To perform this tutorial, I used the Mini Wemos D1 presented earlier .


The pins of the I2C bus may vary from one manufacturer to another, I try to group in this article the pin assignment of the main cards available.


the I2C port on the Wemos D1 Mini is available on the D1 pin (SCL corresponding to GPIO5) and D2 (SDA corresponding to GPIO4).


Warning. The BMP180 must be supplied with a voltage of 3.3 volts



Make the following connection:.


GND GND


3V3 WINE (or 3Vo)


D1 SCL


D2 SDA


ESP8266 BMP180 wemos d1 mini


the coding of BMP180 on ESP8266 is identical an Arduino. I’ve detailed several encoding methods in this previous article . For this article, we will use the Adafruit_BMP085.h library. There are many tutorials on the web but for it to work, it is necessary to initialize the I2C bus with Wire.begin control (SDA pin SCL pin)


The code is perfectly identical to the Arduino code .


 #include #include Adafruit_BMP085 bmp;void setup ()   Serial.begin (9600);    Wire.begin (4, 5);  if (! bmp.begin ())     Serial.println ( "BMP180 / BMP085 found Verifier connect!");    while (1)   void loop () Pressure =");  Serial.print (bmp.readPressure ());  Serial.print ( "Pa");  Serial.print ( "


Résumé





Titre


Projet IoT DIY: ESP8266 + Digital barometer BMP180 + Wemos D1 Mini


Description


Connecting and code to use an atmospheric pressure sensor (barometer) BMP180 / BMP085 with ESP8266 (Wemos D1 Mini) to create a connected barometer.


Author


Christophe


Publisher



Projects DIY


Logo







1 comment:

Powered by Blogger.