Product Introduction
11. Sample Outline
Putting all this together, here is a sample outline for “steer right to 90 degrees” using basic
headings; sensor values are converted before use.
This is pseudocode only; you have the fun of writing the real code in your own
programming language. Modern Robotics provides gyro set-up commands in Java:
http://www.modernroboticsinc.com/integrating-3-axis-gyro
For simplicity, this tutorial has headings increase with CW rotation. This will be true only
for basic headings obtained with the method getHeading from the default/generic class
GyroSensor. The MR web page shows how to use their class ModernRoboticsI2cGyro,
where method getHeading retrieves basic headings (0 - 359), and getIntegratedZValue
retrieves signed headings (- & +); both increasing with CCW rotation.