Pages: [1]   Go Down
Author Topic: Accelerometer MMA3761  (Read 1445 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
#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
}

Logged

New Jersey
Online Online
Faraday Member
**
Karma: 67
Posts: 3694
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

thanks for your answer  smiley
Logged

Pages: [1]   Go Up
Jump to: