Skip to content

For Testing of a BNO085 IMU sensor, with library Adafruit_BNO08x, a arduino program to output pitch, yaw and roll, and a python program using ursina to visualize the orientation of the Sensor in space

Notifications You must be signed in to change notification settings

ReinhardLenz/BNO085_Ursina_visualization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Testing the BNO085 SlimyVR IMU Sensor The photo illustrates the connection setup.

BNO085_slimyVR

The sensor communicates with the Arduino Mega via the I2C bus. When you pick up the BNO085 and rotate it left and right, or tilt it sideways and forwards, you will observe a red box on the computer screen that mirrors these rotational movements. Ensure that the baud rate is consistent in both the Python script and the Arduino program. The current baud rate is set at 9600.

adjustments

The Arduino program, utilizing the Adafruit_BNO08x library, sends data to the COM12 port as follows:

Serial started. Trying to initialize BNO08x. BNO08x Found! X: 0.02 Y: -0.57 Z: -90.12 X: 0.03 Y: -0.57 Z: -90.12 X: 0.03 Y: -0.58 Z: -90.12 X: 0.03 Y: -0.57 Z: -90.12 X: 0.03 Y: -0.57 Z: -90.12 X: 0.03 Y: -0.56 Z: -90.12 X: 0.03 Y: -0.56 Z: -90.11 X: 0.03 Y: -0.56 Z: -90.11 X: 0.03 Y: -0.55 Z: -90.11 ...

In this context, X, Y, and Z correspond to pitch, yaw, and roll respectively.

Roll-Yaw-Pitch

The Python program extracts this data and adjusts the pitch, yaw, and roll angles of the box accordingly:

cuboid.rotation_x = -z % 360 cuboid.rotation_y = -x % 360 cuboid.rotation_z = y % 360

BNO085-ursina

Simultaneously, the program draws the coordinate system, marking the lines as follows: X = 1 line, Y = 2 lines, and Z = 3 lines.

Visitor Count

About

For Testing of a BNO085 IMU sensor, with library Adafruit_BNO08x, a arduino program to output pitch, yaw and roll, and a python program using ursina to visualize the orientation of the Sensor in space

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published