| 
 | " 2013 FRC Java API" | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.wpi.first.wpilibj.SensorBase
edu.wpi.first.wpilibj.Accelerometer
public class Accelerometer
Handle operation of the accelerometer. The accelerometer reads acceleration directly through the sensor. Many sensors have multiple axis and can be treated as multiple devices. Each is calibrated by finding the center value over a period of time.
| Field Summary | 
|---|
| Fields inherited from class edu.wpi.first.wpilibj.SensorBase | 
|---|
| kAnalogChannels, kAnalogModules, kDigitalChannels, kPwmChannels, kRelayChannels, kSolenoidChannels, kSolenoidModules, kSystemClockTicksPerMicrosecond | 
| Constructor Summary | |
|---|---|
| Accelerometer(AnalogChannel channel)Create a new instance of Accelerometer from an existing AnalogChannel. | |
| Accelerometer(int channel)Create a new instance of an accelerometer. | |
| Accelerometer(int slot,
              int channel)Create new instance of accelerometer. | |
| Method Summary | |
|---|---|
|  void | free()Delete the analog components used for the accelerometer. | 
|  double | getAcceleration()Return the acceleration in Gs. | 
|  String | getSmartDashboardType() | 
|  ITable | getTable() | 
|  void | initTable(ITable subtable)Initializes a table for this sendable object. | 
|  double | pidGet()Get the Acceleration for the PID Source parent. | 
|  void | setSensitivity(double sensitivity)Set the accelerometer sensitivity. | 
|  void | setZero(double zero)Set the voltage that corresponds to 0 G. | 
|  void | startLiveWindowMode()Analog Channels don't have to do anything special when entering the LiveWindow. | 
|  void | stopLiveWindowMode()Analog Channels don't have to do anything special when exiting the LiveWindow. | 
|  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 | 
|---|
public Accelerometer(int channel)
channel - the port that the accelerometer is on on the default module
public Accelerometer(int slot,
                     int channel)
slot - the slot that the module is inchannel - the port that the Accelerometer is on on the modulepublic Accelerometer(AnalogChannel channel)
channel - an already initialized analog channel| Method Detail | 
|---|
public void free()
free in class SensorBasepublic double getAcceleration()
public void setSensitivity(double sensitivity)
sensitivity - The sensitivity of accelerometer in Volts per G.public void setZero(double zero)
zero - The zero G voltage.public double pidGet()
pidGet in interface PIDSourcepublic String getSmartDashboardType()
getSmartDashboardType in interface Sendablepublic void initTable(ITable subtable)
initTable in interface Sendablesubtable - The table to put the values in.public ITable getTable()
getTable in interface Sendablepublic void updateTable()
updateTable in interface LiveWindowSendablepublic void startLiveWindowMode()
startLiveWindowMode in interface LiveWindowSendablepublic void stopLiveWindowMode()
stopLiveWindowMode in interface LiveWindowSendable| 
 | " 2013 FRC Java API" | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||