I recently purchased a few thing from the site and I found that my MPL3115A2 Sensor was dead. I tried everything and I am quite sure my code is correct. After testing with a multimeter I an not getting a connection from VIN to Ground. Any help would be appreciated.
Thanks,
-Matt M.
Dead MPL3115A2
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Franklin97355
- Posts: 23938
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Dead MPL3115A2
Could you post clear pictures of both sides of your board showing any soldering you have done and the connections to it?
Could you post your code and a description or drawing of your connections between it all?
Please use the code button "</>" or
Could you post your code and a description or drawing of your connections between it all?
Please use the code button "</>" or
Code: Select all
tags when posting code to the forums.
- mmoderwell
- Posts: 7
- Joined: Sun Oct 05, 2014 5:28 pm
Re: Dead MPL3115A2
I have tried this.
And this.
And this.
Code: Select all
#include "Adafruit_MPL3115A2/Adafruit_MPL3115A2.h"
// Power by connecting Vin to 3-5V, GND to GND
// Uses I2C - connect SCL to the SCL pin, SDA to SDA pin
// See the Wire tutorial for pinouts for each Arduino
// http://arduino.cc/en/reference/wire
Adafruit_MPL3115A2 baro = Adafruit_MPL3115A2();
void setup() {
Serial.begin(115200);
delay(5000);
Serial.println("Adafruit_MPL3115A2 test!");
while(! baro.begin()) {
Serial.println("Could not find sensor.");
delay(1000);
}
}
void loop() {
float pascals = baro.getPressure();
// Our weather page presents pressure in Inches (Hg)
// Use http://www.onlineconversion.com/pressure.htm for other units
Serial.print(pascals/3377); Serial.println(" Inches (Hg)");
float altm = baro.getAltitude();
Serial.print(altm); Serial.println(" meters");
float tempC = baro.getTemperature();
Serial.print(tempC); Serial.println("*C");
delay(250);
}
- Franklin97355
- Posts: 23938
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Dead MPL3115A2
And what output do you get when you run the program?
- mmoderwell
- Posts: 7
- Joined: Sun Oct 05, 2014 5:28 pm
Re: Dead MPL3115A2
Looks like this, and repeats every 250ms.
19872.33 Inches (Hg)
16777216.00 meters
492.69 F
These numbers show up every time.
19872.33 Inches (Hg)
16777216.00 meters
492.69 F
These numbers show up every time.
- Franklin97355
- Posts: 23938
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Dead MPL3115A2
Could you try the example code in the library?
- mmoderwell
- Posts: 7
- Joined: Sun Oct 05, 2014 5:28 pm
Re: Dead MPL3115A2
Yep tried it but to no avail.
- Franklin97355
- Posts: 23938
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Dead MPL3115A2
What output do you get when you run that?Yep tried it but to no avail.
- mmoderwell
- Posts: 7
- Joined: Sun Oct 05, 2014 5:28 pm
Re: Dead MPL3115A2
While it took a little modification to get it running, when I was able to get it running the serial output would be the same numbers as posted before.
- Franklin97355
- Posts: 23938
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Dead MPL3115A2
What did you modify?While it took a little modification to get it running,
- mmoderwell
- Posts: 7
- Joined: Sun Oct 05, 2014 5:28 pm
Re: Dead MPL3115A2
Well because I'm using a Spark Core, I had to edit some of the libraries included in the .cpp and .h files. In Adafruit_MPL3115A2.cpp I commented out the initial inclusions and just had it link to the header file. In Adafruit_MPL3115A2.h, I did the same thing but also included the "application.h" library. The example code is still the same. This is the library just to be sure. https://github.com/adafruit/Adafruit_MPL3115A2_Library
- Franklin97355
- Posts: 23938
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Dead MPL3115A2
Do you have an Arduino you could test the code on? The library may not be compatable with the Spark.
- mmoderwell
- Posts: 7
- Joined: Sun Oct 05, 2014 5:28 pm
Re: Dead MPL3115A2
I also have an Adafruit Trinket 5V but have been unsuccessful with getting it to work either.
- Franklin97355
- Posts: 23938
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Dead MPL3115A2
OK, I can't think of anything else to tell you. Please email [email protected] with a link to this thread for a replacement
Please be positive and constructive with your questions and comments.