Gyro Sensor

The HiTechnic Gyro Sensor is an Analog sensor for the LEGO NXT that senses the rotation speed in a single plane. It can be used on a robot to see how fast it is turning.

You can view the output from the Gyro service using a web browser as shown in the following diagram:

Click for larger image

Output values from the Gyro range from -360 to +360 degrees/second. Positive values are clockwise.

In the diagram above, the output value is negative. As the value changes, the gyro image rotates accordingly (but 360 is scaled to 180 degrees). Therefore the image of the gyro sensor is shown rotated anti-clockwise. The easiest way to understand it is to experiment by twisting the sensor backwards and forwards. Note that the sensor only operates in a single plane with the rotation axis vertically through the sensor. (See the diagram above which shows a top-down view).


For convenience, the Gyro is also exposed as a generic Analog Sensor.

See the general note about Polling which is particularly relevant for this sensor. Because of the inherent delays in polling the sensor, you might find that the values you receive seem to be out of date, and you might even miss quick rotations. This is not a problem with the sensor or the service, but with the latency between requesting data from the sensor and actually receiving it over Bluetooth.

Last edited Mar 2, 2010 at 6:54 AM by TrevorTaylor, version 8


No comments yet.