Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.wpi.first.wpilibj
Class HiTechnicCompass

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

All Implemented Interfaces:
  LiveWindowSendable, IDevice, ISensor, PIDSource, Sendable

    public class HiTechnicCompass

extends SensorBase
implements ISensor, LiveWindowSendable, PIDSource

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

Nested classes/interfaces inherited from interface edu.wpi.first.wpilibj.PIDSource
`PIDSource.PIDSourceParameter`

Field Summary

Fields inherited from class edu.wpi.first.wpilibj.SensorBase
`kAnalogChannels, kAnalogModules, kDigitalChannels, kPwmChannels, kRelayChannels, kSolenoidChannels, kSolenoidModules, kSystemClockTicksPerMicrosecond`

Constructor Summary
`HiTechnicCompass(int slot)` Constructor.

Method Summary
`void` | `free()` Destructor.
`double` | `getAngle()` Get the compass angle in degrees.
`String` | `getSmartDashboardType()`
`ITable` | `getTable()`
`void` | `initTable(ITable subtable)` Initializes a table for this sendable object.
`double` | `pidGet()` Get the result to use in PIDController
`void` | `startLiveWindowMode()` Start having this sendable object automatically respond to value changes reflect the value on the table.
`void` | `stopLiveWindowMode()` Stop having this sendable object automatically respond to value changes.
`void` | `updateTable()` Update the table for this sendable object with the latest values.

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

    public 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.

### pidGet

    public double pidGet()

  Description copied from interface: `PIDSource`
  Get the result to use in PIDController

  Specified by:
    `pidGet` in interface `PIDSource`
  Returns:
    the result to use in PIDController

### getSmartDashboardType

    public String getSmartDashboardType()

  Specified by:
    `getSmartDashboardType` in interface `Sendable`
  Returns:
    the string representation of the named data type that will be used by the smart dashboard for this sendable

### initTable

    public void initTable(ITable subtable)

  Initializes a table for this sendable object.

  Specified by:
    `initTable` in interface `Sendable`
  Parameters:
    `subtable` - The table to put the values in.

### getTable

    public ITable getTable()

  Specified by:
    `getTable` in interface `Sendable`
  Returns:
    the table that is currently associated with the sendable

### updateTable

    public void updateTable()

  Update the table for this sendable object with the latest values.

  Specified by:
    `updateTable` in interface `LiveWindowSendable`

### startLiveWindowMode

    public void startLiveWindowMode()

  Start having this sendable object automatically respond to value changes reflect the value on the table.

  Specified by:
    `startLiveWindowMode` in interface `LiveWindowSendable`

### stopLiveWindowMode

    public void stopLiveWindowMode()

  Stop having this sendable object automatically respond to value changes.

  Specified by:
    `stopLiveWindowMode` in interface `LiveWindowSendable`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

"
For updated information see the Java FRC site
"