Pages: [1]   Go Down
Author Topic: Please help!Newbie on ADXL335  (Read 446 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi when i connect with arduino Uno, i saw output:
326 326 400

how do i change the these value for each axis into acceleration value?in real ms-2 unit...appreciate for any1 to replied, thanks in advance
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 108
Posts: 5144
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Hi when i connect with arduino Uno, i saw output:

Using what circuit? Running which code? You have to help us to help you...
Logged

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


Using what circuit? Running which code? You have to help us to help you...
it is just a simple code:
Code:
const unsigned int X_AXIS_PIN = 0;
const unsigned int Y_AXIS_PIN = 1;
const unsigned int Z_AXIS_PIN = 2;
const unsigned int BAUD_RATE = 9600;

void setup() {
  Serial.begin(BAUD_RATE);
}

void loop() {
  Serial.print(analogRead(X_AXIS_PIN));
  Serial.print(" ");
  Serial.print(analogRead(Y_AXIS_PIN));
  Serial.print(" ");
  Serial.println(analogRead(Z_AXIS_PIN));
  delay(100);
}
how can i get the acceleration from the output?
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 108
Posts: 5144
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You may have to adjust some values but you find an example of how to use the sensor on this page:

http://bildr.org/2011/04/sensing-orientation-with-the-adxl335-arduino/
Logged

Pages: [1]   Go Up
Jump to: