|
Dezibot 4
|
Go to the documentation of this file.
11 #ifndef MotionDetection_h
12 #define MotionDetection_h
62 uint16_t
cmdRead(uint8_t regHigh,uint8_t regLow);
63 uint16_t
cmdWrite(uint8_t regHigh,uint8_t regLow);
187 #endif //MotionDetection
int16_t readDoubleRegister(uint8_t lowerReg)
void calibrateZAxis(uint gforceValue)
uint16_t cmdRead(uint8_t regHigh, uint8_t regLow)
static const uint frequency
IMUResult getAcceleration(void)
Triggers a new Reading of the accelerationvalues and reads them from the IMU.
IMUResult getRotation(void)
Triggers a new reading of the gyroscope and reads the values from the imu.
uint8_t readFromRegisterBank(registerBank bank, uint8_t reg)
void end(void)
stops the component Sets the IMU to Low-Power-Mode
uint getDataFromFIFO(FIFO_Package *buffer)
will read all availible packages from fifo, after 40ms Fifo is full
Orientation getTilt()
calculates how the robot is tilted. It is set, that when the robot is placed normally on a flat table...
static const uint16_t defaultShakeThreshold
void writeToRegisterBank(registerBank bank, uint8_t reg, uint8_t value)
float getTemperature(void)
Reads the current On Chip temperature of the IMU.
void begin(void)
initialized the IMU Component. Wakes the IMU from Standby Set configuration
bool isShaken(uint32_t threshold=defaultShakeThreshold, uint8_t axis=xAxis|yAxis|zAxis)
Detects if at the time of calling is shaken. Therefore the sum over all accelerationvalues is calcula...
Direction getTiltDirection(uint tolerance=10)
Checks in which direction (Front, Left, Right, Back) the robot is tilted.
void writeRegister(uint8_t reg, uint8_t value)
uint16_t cmdWrite(uint8_t regHigh, uint8_t regLow)
uint8_t readRegister(uint8_t reg)
int8_t getWhoAmI(void)
Returns the value of reading the whoAmI register When IMU working correctly, value should be 0x67.
void resetRegisterBankAccess()