MPU9250-Data-Visualization

MPU9250-Data-Visualization © GPL3+

A useful tool to visualize at real time data of the MPU9250 sent through a COM port.

  • 11,142 views
  • 2 comments
  • 14 respects

Components and supplies

About this project

A useful tool to visualize at real time data of the MPU9250 sent through a COM port, using PyQtgraph and PyQt5.

The MPU-9250 is a sensor from Invensense Inc. that combine in one package both accelerometer, gyroscope and magnetometer. It embeds also a thermometer and other useful things. The datasheet can be found here.

Repository Contents

  • /Libraries — An Arduino library from sparkfun
  • /acq_mpu9250 — The Arduino code to send data to a COM port
  • mpuScrollingPlot.py — A Python script for "scrolling plotting"
  • mpuPlotSavedData.py — to visualize saved data

Required Python Package

  • Import serial
  • Import time
  • Import numpy as np
  • From matplotlib import pyplot as plt
  • Import pyqtgraph as pg
  • From pyqtgraph.Qt import QtCore, QtGui
  • Import os
  • Import pyqtgraph.console
  • Import PyQt5

Sending data to a COM port

I use an Arduino board. Here is how I do it:

Results

Here is the interface. It allows you to visualize data. You can also save the data between cursors and plot them later.

The script mpuPlotSavedData.py allows you to plot the saved data using matplotlib.

Resources

Code

Github
https://github.com/Sanahm/MPU9250-Data-Visualization

Comments

Similar projects you might like

Visual Accelerometer

Project tutorial by Reid Paulhus

  • 6,195 views
  • 2 comments
  • 16 respects

DFT Audio Analyser

Project tutorial by Akash Kollipara

  • 2,762 views
  • 0 comments
  • 10 respects

Gesture Controlled Wheelchair

Project showcase by Monil Patel

  • 2,673 views
  • 0 comments
  • 10 respects
Add projectSign up / Login