Lucas Murray ME 305 Portfolio
Lab 0x05

Lab 0x05 I2C and Inertial Measurement Units

IMU To MCU Over I2C

This lab focused on creating an IMU driver class that could connect and provide feedback to our microcontroller through an I2C serial communication bus from a BNO055 IMU. The IMU task instantiates an I2C object and then runs in tandem with the user task to constantly update the euler angles and angular velocities of the BNO055 IMU on the platform. These angles and velocities can then be accessed from other tasks for use in closed loop control to balance the board and the ball on the board.

I2C Object

The I2C file instantiates an I2C serial communication port between the microcontroller and a BNO055 IMU device. It allows for the calibration of the device and the reading of euler angles and angular velocities.
Please see https://lmurray03.bitbucket.io/_i2_c_8py.html for details.

IMU Task

The IMU task performs the necessary manipulation of the I2C object, keeping it updated along with the other tasks and following user interface commands.
Please see https://lmurray03.bitbucket.io/task_i_m_u_8py.html for details.

Edited Files From Previous Labs

At this point in the quarter, our focus changed from working on our mechatronics abilities to building towards our term project: the ball balancing platform. Because of this, much of the previous functionality of the user interface was removed as it was no longer relevant for the platform balancing, and the encoder class and task were removed entirely, being replaced by the IMU task and class. To show all of our previous progress while still being able to build towards the term project, we renamed many of the still relevant files that were used for earlier labs so that if it was desired, you could still go back and run the old code with its completely different functions and abilities. The files used in this lab require the term project files to show their functionality, so please see the term project page linked below.
- https://lmurray03.bitbucket.io/_page8.html

Author
Lucas Murray
Date
March 18, 2022