/* Written by Alex Olivier

 * 1/27/2012
 * Sample code for the ST LY530ALH gyroscope, used in conjunction
 * with the Sparkfun breakout board.
 * 
  • /

int filter_reset = 0; int gyro_data = 3;

void setup(){

  /* We must reset the gyro's digital high pass filter
  to ensure proper performance
  */
  digitalWrite(filter_reset,HIGH);
  digitalWrite(filter_reset, LOW);

}

void loop(){

  analogRead(3);  //read the gyro's yaw value(about the z-axis)

  /*
  // If you want the maximum resolution for the sensor, you
  // should use 3.3 v as an analog reference.  Connect the
  // AREF pin on the Arduino to 3.3 v and set 
  // analogReference to EXTERNAL (see below).

  analogReference(EXTERNAL);  //sets analog ref to 3.3 v
  analogRead(3);  // reads the gyro data
  analogReference(DEFAULT);  // returns analog ref to 5 v
  */

}