This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi Guys,
I just started working with the MSP-EXP430FR5739 FRAM Experimenter Board and on Mode 3 of the included sample code, I believe the program reads one axis reading from the accelerometer and compares it to the calibrated value. what I am trying to do is to use the On-board ADXL335 accelerometer to get the acceleration values in X,Y, Z axis. I was wondering if you guys can provide me with a simple sample code or some help to modify the existing code for this evaluation board.
Thank you so much in advance.
here is the sample code:
const int xpin = 0;
const int ypin = 1;
const int zpin = 2;
void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.print("BEG");
Serial.print("X"); Serial.print(analogRead(xpin));
Serial.print("Y"); Serial.print(analogRead(ypin));
Serial.print("Z"); Serial.print(analogRead(zpin));
Serial.println();
delay(50);
}
this code gives the acceleration values in all three directions.
could you please tell me how can i observe the accelerometer output???
You can observe the output at the other end of your Serial print -- another device such as PC or something like that.
You need to be aware that gravity is equivalent to a big acceleration (> 30 ft/sec/sec). It Z is not aligned with the plumb-line, all three readings are no where near zero even when there is no apparent "acceleration" at all.
**Attention** This is a public forum