In this particular example we are going to simply display temperature, pressure and altitude readings from a MS5611 sensor on an OLED display. We will be using various Wemos MIni shields and an MS5611 sensor
Here is a little about the MS5611
This barometric pressure sensor is optimized for altimeters and variometers with an altitude resolution of 10 cm. The sensor module includes a high linearity pressure sensor and an ultra-low power 24 bit ΔΣ ADC with internal factory calibrated coefficients. It provides a precise digital 24 Bit pressure and temperature value and different operation modes that allow the user to optimize for conversion speed and current consumption. A high resolution temperature output allows the implementation of an altimeter/thermometer function without any additional sensor. The MS5611-01BA can be interfaced to virtually any microcontroller. The communication protocol is simple, without the need of programming internal registers in the device.
This is the module we used which makes it easy to use the sensor
Parts List
1 x Wemos Mini
1 x Wemos Dual Base
1 x OLED Shield
1 x MS5611 sensor (GY-63)
I connect the Wemos Mini to the dual base and then put the OLED shield along side this, I then connect the Ms5611 sensor to the Wemos Mini using cables.
Wemos | Ms5611 |
3v3 | Vcc |
Gnd | Gnd |
SDA | SDA |
SCL | SCL |
Code
Various libraries required – you can install these via the library manager, here are links to them
https://github.com/sparkfun/SparkFun_Micro_OLED_Arduino_Library
https://github.com/jarzebski/Arduino-MS5611 library
If you can’t be bothered typing all of this in you can download the sketch from barometer
[codesyntax lang=”cpp”]
[/codesyntax]
Output
Here you can see the output and my setup
Links
Mini NodeMcu 4M bytes Lua WIFI Internet of Things development board based ESP8266 by WeMos
Double Socket Dual Base Shield for WeMos D1 Mini NodeMCU ESP8266 Diy PCB D1 Expansion board
64X48 IIC I2C LCD OLED LED Dispaly Shield for Arduino Compatible WeMos D1 Mini
GY-63 MS5611-01BA03 Precision MS5611 Atmospheric Pressure Sensor Module Height Sensor Module