I2C pressure and temperature sensor.

The MPL115A2 is a low cost device for reading barometric pressure.

  • I2C digital interface (address: 0x60)
  • Resolution: 1.5 hPa
  • Range: 100-1150 hPa up to 10Km


The MPL115A2 sensor is available on a breakout board from Adafruit


The simplest method of connecting the MPL115A2 to the Netduino requires only four connections:

MPL115A2 on Breadboard

In this diagram, the shutdown (SDWN) and reset (RST) pins have been left floating. Both of these pins are active low and can be tied to Vcc in normal operation.

Note that the Adafruit breakout board has 10K pull-up resistors on teh SDA and SCK lines.


The following application reads the temperature and pressure from the MPL115A2 every second and displays the readings in the Debug output:

using System.Threading;
using Microsoft.SPOT;
using Netduino.Foundation.Sensors.Barometric;

namespace MPL115A2Test
    public class Program
        public static void Main()
            var mpl115a2 = new MPL115A2();

            Debug.Print("MPL115A2 Test");
            while (true)
                Debug.Print("Pressure: " + mpl115a2.Pressure.ToString("f2") + " kPa, Temperature: " + mpl115a2.Temperature.ToString("f2") + "C");


This API supports a polled method of reading the sensor. The Read method forces the sensor to take new readings and then record the readings in the Temperature and Pressure properties.


MPL115A2(byte address = 0x60, ushort speed = 100)

Create a new MPL115A2 object.


double Pressure

Return the pressure reading returned by the last call to the Read method.

This value is recorded in kPa.

double Temperature

Return the temperature reading returned by the last call to the Read method.

This value is recorded in degrees C.


void Read()

Force the sensor to take a reading and record the readings in the Pressure and Temperature properties.