WPILib 2012
WPILibRoboticsLibraryforFRC
|
#include <HiTechnicCompass.h>
Public Member Functions | |
HiTechnicCompass (UINT8 moduleNumber) | |
virtual | ~HiTechnicCompass () |
float | GetAngle () |
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
HiTechnicCompass::HiTechnicCompass | ( | UINT8 | moduleNumber | ) | [explicit] |
Constructor.
moduleNumber | The digital module that the sensor is plugged into (1 or 2). |
HiTechnicCompass::~HiTechnicCompass | ( | ) | [virtual] |
Destructor.
float HiTechnicCompass::GetAngle | ( | void | ) |
Get the compass angle in degrees.
The resolution of this reading is 1 degree.