9-Axis IMU LESSON 21: Visualizing 3D Rotations in Vpython using Quaternions

In this lesson we show how to use quaternions from the BNO055 to create a visualization in Vpython. The visualization is a complete 3D free body rotation of a rigid body. To build this project you will need an Arduino Nano, and an Adafruit BNO055 Inertial Measurement Sensor.

This is the code we developed in the video posted here for your convenience. This code is for demo purposes only and should not be used in real applications. It is for educational purposes only.

This is the code we developed on the python side to do the visualization from the passed quaternions.

9-Axis IMU LESSON 20: Vpython Visualization of Roll, Pitch, and Yaw

This is the arduino code we developed in this lesson to approximate roll, pitch and yaw over small ranges.

This is the python code we developed to visualize the 3 dimensional rotation of a rigid body.

9-Axis IMU LESSON 19: Vpython Visualization of Pitch and Yaw

To play along at home, you will need an Arduino Nano, and an Adafruit BNO055 Inertial Measurement Sensor. In this lesson we create a live visual where a 3D model rotates in space mimicking the pitch and yaw of the breadboard in the real world. We have not yet derived and implemented the math to incorporate roll into the simulation but that will ab done in the next lesson.

This is the code on the arduino side we developed in the video:

This is the code on the Python side we developed in the video:

9-Axis IMU LESSON 17: Review of Basic Trigonometry

In this video we review the basic trigonometry needed in order to get the Vpython visualization to work. With this quick trig tutorial, you should have the math you need to finish the project.

9-Axis IMU LESSON 16: How to Install and Configure Pyscripter

As we move forward, we could really benefit from a better text editor than IDLE to edit our Python Code. In today’s lesson I show you how to download and install Pyscripter, which will make your python coding much easier. I suggest you follow these instructions and move to Pyscripter, as I will be using it for future lessons.