Skip to content

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

License

Notifications You must be signed in to change notification settings

felixbat/MPU9250-Data-Visualization

 
 

Repository files navigation

MPU9250-Data-Visualization

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

How to connect?

Results

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

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

Plotting saved data

Resources

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 54.4%
  • Other 33.1%
  • Python 11.8%
  • C 0.7%