/* Written by Alex Olivier
* 1/27/2012 * Sample code for the ST LY530ALH gyroscope, used in conjunction * with the Sparkfun breakout board. *
- /
int gyro_data = 3;
void setup(){
}
void loop(){
analogRead(3); //read the gyro's yaw (about the z-axis) /* //If you want the maximum resolution for the 4x sensor output, you //should use 3.3 v as an analog reference. Connect the //AREF pin to 3.3 v and set analogReference to EXTERNAL. //For max resolution with the 1x sensor output, consider //using an external ADC (analog-digital converter) that //provides more data than 10 bits (0-1023), such as a 12/14 bit ADC analogReference(EXTERNAL); //sets analog ref to 3.3 v analogRead(3); // reads the gyro data analogReference(DEFAULT); // returns analog ref to 5 v */
}