2010 FRC Java API


edu.wpi.first.wpilibj
Class HiTechnicCompass

java.lang.Object
  extended by edu.wpi.first.wpilibj.SensorBase
      extended by edu.wpi.first.wpilibj.HiTechnicCompass

public class HiTechnicCompass
extends SensorBase

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


Nested Class Summary
 class HiTechnicCompass.CompassException
          An exception dealing with connecting to and communicating with the HiTechnicCompass
 
Field Summary
 
Fields inherited from class edu.wpi.first.wpilibj.SensorBase
kAnalogChannels, kAnalogModules, kChassisSlots, kDigitalChannels, kPwmChannels, kRelayChannels, kSolenoidChannels, kSolenoidModules, kSystemClockTicksPerMicrosecond
 
Constructor Summary
HiTechnicCompass(int slot)
          Constructor.
 
Method Summary
protected  void free()
          Destructor.
 double getAngle()
          Get the compass angle in degrees.
 
Methods inherited from class edu.wpi.first.wpilibj.SensorBase
checkAnalogChannel, checkAnalogModule, checkDigitalChannel, checkDigitalModule, checkPWMChannel, checkPWMModule, checkRelayChannel, checkRelayModule, checkSolenoidChannel, checkSolenoidModule, getDefaultAnalogModule, getDefaultDigitalModule, getDefaultSolenoidModule, setDefaultAnalogModule, setDefaultDigitalModule, setDefaultSolenoidModule
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HiTechnicCompass

public HiTechnicCompass(int slot)
Constructor.

Parameters:
slot - The slot of the digital module that the sensor is plugged into.
Method Detail

free

protected void free()
Destructor.

Overrides:
free in class SensorBase

getAngle

public double getAngle()
Get the compass angle in degrees. The resolution of this reading is 1 degree.

Returns:
Angle of the compass in degrees.

2010 FRC Java API


Copyright © 2006-2009 Sun Microsystems, Inc. All Rights Reserved.