public class ADXL345_I2C extends I2C implements ADXL345, SensorModule
Interface.InterfaceTypeADXL345.AxisIAccelerometer.AccelRange| Modifier and Type | Field and Description |
|---|---|
private IAccelerometer.AccelRange |
m_range |
m_ifaceType, MAX_ANALOG_IN_CHANNELS, MAX_ANALOG_OUT_CHANNELS, MAX_DIGITAL_CHANNELS, MAX_PWM_CHANNELS, MAX_RELAY_CHANNELSADDRESS_MULTI_BYTE, ADDRESS_READ, ADDRESS_READ_MULTI_REG, DATA_FORMAT_FULL_RES, DATA_FORMAT_INT_INVERT, DATA_FORMAT_JUSTIFY, DATA_FORMAT_REGISTER, DATA_FORMAT_SELF_TEST, DATA_FORMAT_SPI, DATA_REGISTER, GS_PER_LSB, POWER_CONTROL_AUTOSLEEP, POWER_CONTROL_LINK, POWER_CONTROL_MEASURE, POWER_CONTROL_REGISTER, POWER_CONTROL_SLEEP| Constructor and Description |
|---|
ADXL345_I2C(I2C.Port port,
int address) |
| Modifier and Type | Method and Description |
|---|---|
void |
disableModule()
Disable the module
|
void |
enableModule()
Enable the module
|
double |
getAcceleration(ADXL345.Axis axis)
Get the acceleration of one axis in Gs.
|
double[] |
getAccelerations()
Get the acceleration of all axes in Gs.
|
IAccelerometer.AccelRange |
getAccelRange() |
boolean |
getModuleEnabled() |
java.lang.String |
getSmartDashboardType() |
ITable |
getTable() |
void |
initTable(ITable subtable) |
void |
setAccelRange(IAccelerometer.AccelRange range) |
void |
startLiveWindowMode() |
void |
stopLiveWindowMode() |
void |
updateTable() |
broadcast, checkAddress, free, read, readBit, readBit, readBits, readByte, readBytes, readOnly, readWord, readWords, transaction, verifySensor, write, writeBit, writeBit, writeBits, writeBulk, writeByte, writeBytes, writeWord, writeWordsallocateMXPPin, checkAnalogInputChannel, checkAnalogOutputChannel, checkDigitalChannel, checkPWMChannel, checkRelayChannel, freeMXPPin, getInterfaceTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAccelerationX, getAccelerationY, getAccelerationZprivate IAccelerometer.AccelRange m_range
public ADXL345_I2C(I2C.Port port, int address)
port - address - public void setAccelRange(IAccelerometer.AccelRange range)
public IAccelerometer.AccelRange getAccelRange()
public double getAcceleration(ADXL345.Axis axis)
ADXL345getAcceleration in interface ADXL345axis - The axis to read from.public double[] getAccelerations()
ADXL345getAccelerations in interface ADXL345public void updateTable()
updateTable in interface UpdatingSendablepublic void startLiveWindowMode()
startLiveWindowMode in interface LiveWindowSendablestartLiveWindowMode in interface ADXL345public void stopLiveWindowMode()
stopLiveWindowMode in interface LiveWindowSendablestopLiveWindowMode in interface ADXL345public java.lang.String getSmartDashboardType()
getSmartDashboardType in interface SendablegetSmartDashboardType in interface ADXL345public void enableModule()
enableModule in interface Modulepublic void disableModule()
disableModule in interface Modulepublic boolean getModuleEnabled()
getModuleEnabled in interface Module