# Nt1310 Unit 5 Assignment 1

687 Words3 Pages

The Bosch BNO055 IMU sensors come with the software package that consists of sensor drivers. In order to let the sensors to give data, these drivers should be added in the Arduino software library folder inside the computer. The driver is capable of giving the raw sensor data by using the sensor library in the Arduino code. The Arduino library used for this purpose was ‘Wire Library’, which allow communication with I^2 C devices. This library can be manually downloaded and added to the Arduino folder. After adding the library, the code can be run and compiled to get the raw values from the sensors. Figure 18: Selecting the sensor drivers from Arduino Obtaining Raw Sensor Data The raw data from the sensor can acquire by using the functions …show more content…

The function accepts a single vector_type parameter at a time and returns 3-axis data of the selected parameter. The vector_type can be of the following parameters state below. IMU sensor BNO055 was the vector_type_t for this purpose. VECTOR_MAGNETOMETER (µT) VECTOR_GYROSCOPE (rad⁄sec) VECTOR_EULER (degrees) VECTOR_ACCELEROMETER (m⁄s^2 ) VECTOR_LINEARACCEL (m⁄s^2 ) VECTOR_GRAVITY (m⁄s^2 ) The sensors are capable of transmitting the orientation data in both Euler and Quaternion angles depending upon the function used. As the requirement of this project is concerned, the values from the vector function we were concerned was VECTOR-EULER (degrees) and was VECTOR-GYROSCOPE (rad⁄sec). From these functions, the required data needed was inclination, angular velocity and linear acceleration. For inclination, we directly used the Euler vector function which gives data in 0-359 ͦ. For angular velocity, vector gyroscope function was used. This function directly gives data in rad⁄sec which was required for finding angular velocity of the sensor. Finally, for linear acceleration, function called vector linear acceleration was used. Figure below shows the VECTOR-EULER function used for getting the required inclination values from the sensor. The code was written in Arduino …show more content…

It loads a 3D model in an ‘.obj file’ format and converts the data from the sensor to a sketch on the microcontroller. The sketch on the UNO gives the data over the UART (Universal Asynchronous Receiver/Transmitter), which is based on the incoming orientation data from the sensor. The bunny program from the sensor library is first uploaded from the Arduino to the serial port. For visualizing the data, Processing 3.0 software is used which converts the data to 3D visual. It uses the OBJ library and G4P GUI library to visualize and process data to a bunny sketch. On the GUI of the sketch, available ports are mentioned where the serial port can be selected. This port should be selected the same as that used for Arduino serial interface. After selecting the port, the program is run and a bunny appears on the window. As the breakout board is rotated, the bunny rotates in the same manner in a 3D space. This test shows that the fusion algorithms are working in the correct way to give the orientation of the sensor in 3