Gyro and Accelerometer

Hi everyone!
I was hoping someone would help me here before I go to the store to get new ones.

The thing is, I bought an ADXRS610 gyro and an ADXL335 Accelerometer and plugged them into my arduino uno using the following schematics:



and I uploaded the following code to the arduino:

int analogPin = 0;

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

void loop()
{
  Serial.println(analogRead(analogPin, DEC);
  delay(500);
}

but I get random numbers as if disconnected from analog, actually if I disconnect analog 0 I keep getting the same kind of random numbers...

The thing is, I bought an ADXRS610 gyro and an ADXL335 Accelerometer and plugged them into my arduino uno using the following schematics:

A clear photo of your actual setup would be useful, so that we can confirm that you did indeed wire them correctly (or not).

A clear photo of your actual setup would be useful

sorry I don't have a camera right now and my iPhone's camera won't focus near enough to be able to distinguish everything fine... but I ca assure you I have checked thousands of times every connection and still the same... what are the chances of having bought NEW hardware ad getting both broken? If I can't get them to work before monday I'll have to call the store to get new ones instead...

what are the chances of having bought NEW hardware ad getting both broken?

Pretty small. Either the wiring isn't correct, or the analog pin you are connecting to is not the one that the code is reading from.

Just to have it really clear: the number should be constant, when the sensor is on a steady position, right? Because in my case the numbers are something between 300 and 420 and I already tried it out with 2 different Arduino Boards. So I suppose, the sensor is broken...

Thank You!

Does it compile / verify?

Serial.println(analogRead(analogPin, DEC);

I think there's a ')' missing?

Sorry, being picky!

i was working with this Code, which is nearly the same. and this one compiles and gives me the corresponding output, but with nearly complete random numbers...

int z; 

void setup()
{
  Serial.begin(9600);           // sets the serial port to 9600
}

void loop() 
{
  z = analogRead(0);       // read analog input pin 0
  Serial.print("rotation rate in z: ");
  Serial.println(z, DEC);  // print the rotation rate in the Z axis
  delay(100);              // wait 100ms for next reading
}

Does anyone also know, how to calculate the Angular velocity into something more useful, e.g. to make an integral calculation with it? In general, I just know the maths of functions but not of a row of particular values.. and i am completely unexperienced with this kind of maths on the arduino board.

maybe someone can give some tips?

Thanks!

Does anyone also know, how to calculate the Angular velocity into something more useful, e.g. to make an integral calculation with it?

Gosh!
No, I don't think anyone has ever asked that question here before on this forum.
I'm stumped.

At least I'm stumped enough to not want to type out an answer again when there's a perfectly good search facility.