MMA8451 couldn't start

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
irenaym
 
Posts: 1
Joined: Thu Apr 09, 2015 5:47 pm

MMA8451 couldn't start

Post by irenaym »

After assembling the MMA8451 Adafruit accelerometer and running the code, it prints out the "couldn't start" in the serial monitor, rather than "MMA8451 found!" We have rechecked our connections and everything seems right. We used the default code, "MMA8451 demo," available online. What could the problem be?

Here is the portion of the code related to the problem:

Code: Select all

#include <Wire.h>
#include <Adafruit_MMA8451.h>
#include <Adafruit_Sensor.h>

Adafruit_MMA8451 mma = Adafruit_MMA8451();

void setup(void) {
  Serial.begin(9600);
  
  Serial.println("Adafruit MMA8451 test!");
  

  if (! mma.begin()) {
    Serial.println("Couldnt start");
    while (1);
  }
  Serial.println("MMA8451 found!");
  
  mma.setRange(MMA8451_RANGE_2_G);
  
  Serial.print("Range = "); Serial.print(2 << mma.getRange());  
  Serial.println("G");
  
}

Thanks in advance for any responses.
Last edited by Franklin97355 on Thu Apr 09, 2015 10:36 pm, edited 1 time in total.
Reason: Added missing [code] tags

User avatar
Franklin97355
 
Posts: 23911
Joined: Mon Apr 21, 2008 2:33 pm

Re: MMA8451 couldn't start

Post by Franklin97355 »

Could you post clear, detailed pictures of both sides of your board showing any soldering you have done and the connections to it?

User avatar
Dgt211
 
Posts: 19
Joined: Tue Oct 07, 2014 10:46 pm

Re: MMA8451 couldn't start

Post by Dgt211 »

had the same problem and then soldered my connections better and it worked!

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”