Java Gyroscope Template