adxl 335 code

I'm trying to connect a adxl 335 to my arduino uno. I followed the directions on this site

http://michaelabrahamsen.com/10/2010/using-the-adxl335-accelerometer-with-arduino/

and used the code listed there, but my serial monitor isn't giving me numbers, only a bunch of gibberish.

anyone know what's wrong?

Thanks

You've got the wrong bit rate set? You've got a TTL to RS232 conversion issue?

I got a different code, and now it is working. Thanks

And what was the problem (so that others may learn from your experience) ?

I'm not sure what the problem was!!! However, here is how i hooked it up as well as my code:adxl 335-arduino uno st-A0 z-A1 y-A2 x-A3 gnd-A4 vcc-A5

My code is:

/*
  
 This example code is in the public domain.

*/

// these constants describe the pins. They won't change:
const int groundpin = 18;             // analog input pin 4 -- ground
const int powerpin = 19;              // analog input pin 5 -- voltage
const int xpin = A3;                  // x-axis of the accelerometer
const int ypin = A2;                  // y-axis
const int zpin = A1;                  // z-axis (only on 3-axis models)

void setup()
{
  // initialize the serial communications:
  Serial.begin(9600);
  
  // Provide ground and power by using the analog inputs as normal
  // digital pins.  This makes it possible to directly connect the
  // breakout board to the Arduino.  If you use the normal 5V and
  // GND pins on the Arduino, you can remove these lines.
  pinMode(groundpin, OUTPUT);
  pinMode(powerpin, OUTPUT);
  digitalWrite(groundpin, LOW); 
  digitalWrite(powerpin, HIGH);
}

void loop()
{
  // print the sensor values:
  Serial.print(analogRead(xpin));
  // print a tab between values:
  Serial.print("\t");
  Serial.print(analogRead(ypin));
  // print a tab between values:
  Serial.print("\t");
  Serial.print(analogRead(zpin));
  Serial.println();
  // delay before next reading:
  delay(100);
}

Thank you so much!!!