WPILib 2012
WPILibRoboticsLibraryforFRC
Public Member Functions
HiTechnicCompass Class Reference

#include <HiTechnicCompass.h>

Inheritance diagram for HiTechnicCompass:
SensorBase ErrorBase

List of all members.

Public Member Functions

 HiTechnicCompass (UINT8 moduleNumber)
virtual ~HiTechnicCompass ()
float GetAngle ()

Detailed Description

HiTechnic NXT Compass.

This class alows access to a HiTechnic NXT Compass on an I2C bus. These sensors to not allow changing addresses so you cannot have more than one on a single bus.

Details on the sensor can be found here: http://www.hitechnic.com/index.html?lang=en-us&target=d17.html

Todo:
Implement a calibration method for the sensor.

Constructor & Destructor Documentation

HiTechnicCompass::HiTechnicCompass ( UINT8  moduleNumber) [explicit]

Constructor.

Parameters:
moduleNumberThe digital module that the sensor is plugged into (1 or 2).
HiTechnicCompass::~HiTechnicCompass ( ) [virtual]

Destructor.


Member Function Documentation

float HiTechnicCompass::GetAngle ( void  )

Get the compass angle in degrees.

The resolution of this reading is 1 degree.

Returns:
Angle of the compass in degrees.

The documentation for this class was generated from the following files:
 All Classes Functions Variables