Skip to content

Inertial Measurement Unit (IMU) demonstration using 96Boards CE

License

Notifications You must be signed in to change notification settings

96boards-projects/imu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IMU-MPU6050 interfacing

This project shows how to interface 6 DoF IMU (Intertial Measurement Unit) with 96Boards. Sensor value will be read by a C program and passed to a Python script which does 3D rendering with the help of OpenGL and pygame. This allows us to visualize the rotation about X and Y axes graphically. Unix socket is used for IPC (Inter Process Communication) between C and Python processes.

Table of Contents

1. Hardware

1.1 Hardware Requirements:

  1. DragonBoard 410c
  2. Power Supply
  3. Sensors Mezzanine
  4. MPU6050 IMU

1.2 Hardware Setup:

First, connect the Sensors Mezzanine to DragonBoard410c via low-speed expansion connector. Then, connect MPU6050 to I2C0 of Sensors Mezzanine.

2. Software

2.1 Operating System

2.2 Package Dependencies

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install libmraa-dev python-opengl python-pygame

3. Building and Running:

$ git clone https://github.com/96boards-projects/imu.git      
$ cd projects/imu																													
$ make

Now, hold the sensor in horizontal manner and run the generated binary as a background process

$ sudo ./imu&

Next, invoke the python script to visualize IMU data

$ sudo python visualize.py

4. Conclusion:

Sensor can be moved about X and Y axes so that the tile on display also moves accordingly. Simply close the pygame window to exit both processes gracefully.

Before running the binary again, delete /tmp/socket as below:

$ sudo rm -rf /tmp/socket

5. Video

Demonstration video

Releases

No releases published

Packages

No packages published