Go Down

Topic: Accelerometer MMA3761 (Read 1 time) previous topic - next topic

KalleL

I have found in the forum the scetch included below , but gets the following error :
"AcceleroMMA7361 does not name a type"
This inspite of having installed the correponding library ...what´s wrong ??

Code: [Select]

#include <AcceleroMMA7361.h>
AcceleroMMA7361 accelero;
int x;
int y;
int z;
void setup()
{
Serial.begin(9600);
accelero.begin(13, 12, 11, 10, A0, A1, A2);
accelero.setARefVoltage(5); //sets the AREF voltage to 3.3V
accelero.setSensitivity(HIGH); //sets the sensitivity to +/-6G
// accelero.calibrate();
}
void loop()
{
// x = accelero.getXAccel();
y = accelero.getYAccel();
// z = accelero.getZAccel();


// Serial.print("\nx: ");
// Serial.print(x);
Serial.print(" \ty: ");
Serial.print(y);
delay(1000); //make it readable
}


wildbill

Generally, it either means you haven't restarted the IDE since you installed the library, or you installed it in the wrong place.

KalleL

Effectively , the library was installed under Arduino 1.03 instead of 1.05...

thanks for your answer  :)

Go Up