• I am using a MDBT42Q breakout. It is on a breadboard. The MDBT42Q and the MPL3115A2 are powered with 5v. The screen does work. I was getting the same readings when it wasn't in the mix. The MPL3115A2 is from Adafruit.

    I have refactored my code to this (with the same result):

    var i2c = new I2C();
    I2C1.setup({scl: D20, sda: D22});
    var mpl = require("MPL3115A2").connect(i2c);
    var lcd = require("HD44780").connectI2C(I2C1, 0x3F);
    lcd.setCursor(0, 0);
    const onInit = ()=> {
      setInterval(() => {
        mpl.getPressure(function(x) {
          console.log("Pressure "+x+" pa");
          mpl.getAltitude(function(x) {
            console.log("Altitude "+x+" m");
              mpl.getTemperature(function(x) {
              console.log("Temperature "+x+" C");
      }, 5000);
    setTimeout(onInit, 3000);

    Per @allObjects I changed it so that I was only reading pressure. When I do that, the readings are 100066, and that is really close to the Arduino.


Avatar for calebbrewer @calebbrewer started