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