write gyro test program