Wemos and Barometric Pressure Shield example

In this article we look at a relatively new shield for the Wemos/Lolin products – this is a Barometric Pressure shield based on a HP303B. Here is some info about the sensor

The HP303B is a miniaturized Digital Barometric Air Pressure Sensor with a high accuracy and a low current consumption, capable of measuring both pressure and temperature.
The pressure sensor element is based on a capacitive sensing principle which guarantees high precision during temperature changes. The small package makes the HP303B ideal for mobile applications and wearable devices.

The internal signal processor converts the output from the pressure and temperature sensor elements to 24 bit results. Each unit is individually calibrated, the calibration coeicients calculated during this process are stored in the calibration registers. The coeicients are used in the application to convert the measurement results to high accuracy pressure and temperature values.

The result FIFO can store up to 32 measurement results, allowing for a reduced host processor polling rate. Sensor measurements and calibration coeicients are available through the serial I2C or SPI interface. The measurement status is indicated by status bits or interrupts on the SDO pin.