Code Monkey home page Code Monkey logo

oguplot's Introduction

Oguplot Repository

sample_image

Repository to contain source code and versions of the python live plot project. Will contain;

  • Code
  • Issues
  • Workflow
  • Features to be added

Demo

Demo of the old script in action

Current Issues:

Pyserial warning. The following error warning keeps coming up when I run on Windows 7 (does not happen on Ubuntu 14.04)

SerialException: could not open port 'COM3': PermissionError(13, 'Access is denied.', None, 5)

Restarting the kernel is a solution. Removing all variables also works. (From IPython console in Spyder)

Issue resolved. The program now checks if the port is available.

Also resolved an issue where every second time the script is run from the ipython console, the kernel crashes. This is specifically a spyder issue. This is due to the previous instance of QT not being ternimated when the script is shut, thus when the script is executed again, the kernel crashes as Qt does not like more than one instance of itself running at once. Previously, a new instance would be created at the start;

    app = QtGui.QApplication([])

Now the instance is created only if one does not already exist. Otherwise old instance is used

if not QtGui.QApplication.instance():
    app = QtGui.QApplication([])
else:
    app = QtGui.QApplication.instance()

Added GUI

The script no longer plots as soon as it is run. Now the serial number of the device printing csv values needs to be entered. Hitting poll button will then queery all connected serial devices for their serial numbers. If a matching serial number is found, the graph will start plotting. Also added a close button to close the current port. Hitting close will close the serial port and the plot will stop.

Micro-controller setup

For testing I'm using an Arduino Uno Rev3 with an MPU6050. The code is printed to the serial monitor in comma separated format in x,y pairs on a new line. Any two values will work as long as they are separated by a comma. See below code for example;

Serial.print(AcX);Serial.print(",");Serial.println(AcY);

Where AcX and AcY are 16 bit signed integers (int16_t). See below for sample output in Serial monitor;

140,-140
48,-256
104,-188
176,-372
172,-208
-32,-204
124,-212
336,-388
0,-328

oguplot's People

Contributors

ozyozk 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.