WALL-E Version 1.0
The "WALL-E" Project is a ME 507 quarter term project inspired to recreate the robot WALL-E. The WALL-E robot is a fully 3D printed robot with modified components in order to fit the needs of the chosen peripherals and electronics. WALL-E contains a custom made PCB which is housed in the main body of WALL-E. WALL-E's peripherals and components include 2 pololu Romi Motors with encoders, 4 MG90s servos, BNO055 IMU, and a OV2640 ArduCam camera. The objective of WALL-E is to scan the surrounding area for the closest object to it. Once that object is detected, WALL-E drives up to the object, attempts to pick up or hold the object and detect the color of the object.
Loading...
Searching...
No Matches
BNO055 Class Reference

BNO055 class for the IMU containing modes of operation, initialization, and reading data. More...

#include <bno055.h>

Public Types

enum class  REG : uint8_t { CONFIG_MODE = 0x00 , IMU = 0x08 , NDOF = 0x0C }
 Enumerated class REG of the IMU modes that will be used. More...

Public Member Functions

 BNO055 (I2C_HandleTypeDef *hi2c, uint8_t addr=0x28)
 Constructor Function to initialize the BNO055 Class.
bool init_imu (REG mode=REG::NDOF)
 Function handles the configuration and initialization of the BNO055 IMU.
bool updateEuler ()
 Function Updates the Euler values based on the IMU's current readings. Roll Pitch, and Yaw are updated within the class.
bool readCalibStatus (uint8_t &sys, uint8_t &gyro, uint8_t &accel, uint8_t &mag)
 Function Checks the Calibration status of the IMU and individual sensors.
bool updateGyro ()
 Function pull they data from the gyroscope retrieving angular velocities.
int16_t getYawRateZ ()
 Function allows users to retrieve the yaw rate around the Z axis.
int16_t getYaw ()
 Function allows for the user to get the current yaw value.
int16_t getRoll ()
 Function allows for the user to get the current roll value.
int16_t getPitch ()
 Function allows for the user to get the current pitch value.

Private Member Functions

bool writeByte (uint8_t reg, uint8_t value)
 Function writes values to the specified register given by the user.
bool readLen (uint8_t reg, uint8_t *buffer, uint8_t len)
 Function reads the current value of the specified register given by the user.

Private Attributes

I2C_HandleTypeDef * hi2c
uint8_t addr
int16_t pitch
int16_t yaw
int16_t roll
int16_t gyroX
int16_t gyroY
int16_t gyroZ

Detailed Description

BNO055 class for the IMU containing modes of operation, initialization, and reading data.

Member Enumeration Documentation

◆ REG

enum class BNO055::REG : uint8_t
strong

Enumerated class REG of the IMU modes that will be used.

Enumerator
CONFIG_MODE 

Configuration Mode CONFIG_MODE

IMU 

Normal IMU Mode IMU

NDOF 

Fusion Mode NDOF

Constructor & Destructor Documentation

◆ BNO055()

BNO055::BNO055 ( I2C_HandleTypeDef * hi2c,
uint8_t addr = 0x28 )

Constructor Function to initialize the BNO055 Class.

Member Function Documentation

◆ getPitch()

int16_t BNO055::getPitch ( )

Function allows for the user to get the current pitch value.

Returns
int16_t

◆ getRoll()

int16_t BNO055::getRoll ( )

Function allows for the user to get the current roll value.

Returns
int16_t

◆ getYaw()

int16_t BNO055::getYaw ( )

Function allows for the user to get the current yaw value.

Returns
int16_t

◆ getYawRateZ()

int16_t BNO055::getYawRateZ ( )

Function allows users to retrieve the yaw rate around the Z axis.

Returns
int16_t

◆ init_imu()

bool BNO055::init_imu ( REG mode = REG::NDOF)

Function handles the configuration and initialization of the BNO055 IMU.

Parameters
modeParameter for determining what mode to operate the IMU at see REG modes
Returns
Boolean

◆ readCalibStatus()

bool BNO055::readCalibStatus ( uint8_t & sys,
uint8_t & gyro,
uint8_t & accel,
uint8_t & mag )

Function Checks the Calibration status of the IMU and individual sensors.

Parameters
sysParameter for a reference to the system calibration status
gyroParameter for a reference to the gyro calibration status
accelParameter for a reference to the accel calibration status
magParameter for a reference to the mag calibration status
Returns
True upon successful readings

◆ readLen()

bool BNO055::readLen ( uint8_t reg,
uint8_t * buffer,
uint8_t len )
private

Function reads the current value of the specified register given by the user.

Parameters
regParameter that takes in a register to read from
bufferParameter that takes in a data buffer to read the data from the select register
lenParameter that specifies the length of the incoming data
Returns
Boolean

◆ updateEuler()

bool BNO055::updateEuler ( )

Function Updates the Euler values based on the IMU's current readings. Roll Pitch, and Yaw are updated within the class.

Returns
Boolean

◆ updateGyro()

bool BNO055::updateGyro ( )

Function pull they data from the gyroscope retrieving angular velocities.

Returns
Boolean

◆ writeByte()

bool BNO055::writeByte ( uint8_t reg,
uint8_t value )
private

Function writes values to the specified register given by the user.

Parameters
regParameter that takes in a register value to write to
valueParameter that takes in the data to write to the specified register
Returns
Boolean

Member Data Documentation

◆ addr

uint8_t BNO055::addr
private

Private variable addr. Holds the imu device specific address (0x28 or 0x29)

◆ gyroX

int16_t BNO055::gyroX
private

Private variable gyroX. Holds the X data read from the IMU's gyroscope

◆ gyroY

int16_t BNO055::gyroY
private

Private variable gyroY. Holds the Y data read from the IMU's gyroscope

◆ gyroZ

int16_t BNO055::gyroZ
private

Private variable gyroZ. Holds the Z data read from the IMU's gyroscope

◆ hi2c

I2C_HandleTypeDef* BNO055::hi2c
private

Private Variable hi2c. Sets the I2C definition fromt the STM32 HAL Config

◆ pitch

int16_t BNO055::pitch
private

Private variable pitch. Holds the pitch data read from the IMU

◆ roll

int16_t BNO055::roll
private

Private variable roll. Holds the roll data read from the IMU

◆ yaw

int16_t BNO055::yaw
private

Private variable yaw. Holds the yaw data read from the IMU


The documentation for this class was generated from the following files:
  • C:/Users/arath/OneDrive/Documents/ME 507/Project-WALLE/Code/Inc/bno055.h
  • C:/Users/arath/OneDrive/Documents/ME 507/Project-WALLE/Code/src/bno055.cpp