Giter Club home page Giter Club logo

serialport-realtime-data-plotter's Introduction

SerialPort-Data-Monitor

Prerequisites: Python - pyqwt - numpy - pyserial - csv

A serial port real time data monitor that plots live data using PyQwt. In this case the plotted data are the acceleration (gx, gy, gz) measured by the ADXL345 accelerometer and send via an arduino through the serial port.

ADXL345-Monitor

The monitor expects to receive 6 bytes data packets with a line return as a packet EOF on the serial port and a space as byte seperator. Each received packet is analysed to extract gx, gy and gz.

The serial packet respect the following rules:

  • 3 inputs, every input is a 2 bytes (Two's complement for ADXL345)
  • 6 bytes seperated by a space
  • the packet is a string terminated by '\n'

This format could be easily adapted. See sender_sim.py for example of the transmitted data to be plotted

When the monitor is active, you can:

  • turn the 'Update speed' knob to control the frequency of screen updates.
  • activate or deactivate each channel
  • change the length of csv file to save (containing the data + a timestamp)

This application work with an arduino conntected to an ADXL345 through the SPI bus and to the computer serial port through a serial communication. See the arduino code ADXL345_Transmitter for further informations.

The code could be emulated with a simulated data sender script (See sender_sim.py), to do that:

Code inspired from Eli Bendersky work http://eli.thegreenplace.net/2009/08/07/a-live-data-monitor-with-python-pyqt-and-pyserial/

See this sparkfun guide for further ADXL345 informations https://www.sparkfun.com/tutorials/240

Author: mba7 Email: [email protected] Date: 07-2014

serialport-realtime-data-plotter's People

Contributors

mba7 avatar

Watchers

James Cloos avatar Sanjay Jain avatar

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.