Giter Club home page Giter Club logo

imu's Introduction

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

imu's People

Contributors

ric96 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

imu's Issues

doesnt work

sudo apt-get install libmraa-dev python-opengl python-pygame
is failing with
Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package PyOpenGL E: Unable to locate package pygame
is it because this hasnt been updated in 4 years?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.