Shop OBEX P1 Docs P2 Docs Learn Events
Is There A Simple Propeller Object For Plotting on Laptop Screen? — Parallax Forums

Is There A Simple Propeller Object For Plotting on Laptop Screen?

Hi,

The Parallax Serial Terminal is great for interacting with a Spin program using text and characters. Is there a similar simple Object in the OBEX that enables simple plotting of data points on a laptop screen?

In advance, thank you

Comments

  • jmgjmg Posts: 15,148
    robotics wrote: »
    The Parallax Serial Terminal is great for interacting with a Spin program using text and characters. Is there a similar simple Object in the OBEX that enables simple plotting of data points on a laptop screen?
    That's a slightly unusual request, as the laptop screen is under PC control, so any P1 OBEX cannot access the screen directly.

    A couple of approaches are possible :

    a) You can use a PC-Terminal program, and send Terminal command strings from the Prop.
    This is usually character-coarse, but may be enough for you ?
    You can expanded this using custom Fonts, with Bar-Graph fonts, to get single pixel X resolution.

    b) If your 'plotting of data points' needs higher precision, multiple graphs overlayed, and zoom etc, we have used the LTSpice .RAW file format with good results.

    You sent a file to the PC, and view .RAW in LTSpice. It's their standard Spice plot format.

    LTSpice can zoom/measure the points, to a high degree of precision, and you can post process that RAW file if you want.
  • I use minicom on Linux and I have set the font size to 0.5 and sent through characters as "pixels". Have a look at this post about plotting circles.

    BTW, PST is not ANSI compatible but you may be able to position the cursor although you may not be able to make the terminal large enough.
  • You could emit text coordinates as comma-delimited numbers, with a carriage return after each pair, then use a program like Excel or Numbers to do an X-Y scatter-plot of the result. I've done that before and it works, though it's not plotting in real-time.
  • For something like this I would invest some time in Xojo which is a platform to create simple to complex cross platform apps. Serial from the Prop over USB is very simple. Take date from the Prop and draw lines or points on the screen. There is a learning curve for your application as far as drawing the screen but you'll be rewarded learning this as you can put apps together for other projects moving forward. This is a great companion to the Prop and there is a robust forum to assist you. For some things you can create apps in minutes and build for mac linux pc. It is not free, but the demo is full function except you can only test in debug mode, you cant build without paying 100 a year. To me, it is invaluable.
  • T Chap wrote: »
    For something like this I would invest some time in Xojo which is a platform to create simple to complex cross platform apps. Serial from the Prop over USB is very simple. Take date from the Prop and draw lines or points on the screen. There is a learning curve for your application as far as drawing the screen but you'll be rewarded learning this as you can put apps together for other projects moving forward. This is a great companion to the Prop and there is a robust forum to assist you. For some things you can create apps in minutes and build for mac linux pc. It is not free, but the demo is full function except you can only test in debug mode, you cant build without paying 100 a year. To me, it is invaluable.

    Thanks for the tip, I'm playing with Xojo now to write a cross-platform plotting terminal! See how it goes.

  • T ChapT Chap Posts: 4,198
    edited 2017-01-12 02:25
    Xojo is the best thing ever IMO. Great forum too.

    BTW There are plugins for various needs, you will find demos for Monkeybread plugins that are full functional in debug mode and the build, but it pops up if you don't buy it. Highly recommended, search their site for plotting or graphs. Great company, Christian is the owner and is incredibly helpful. I have built many apps that are lifesavers.

    If you send me an email I can send you some projects that already are set up for serial with the Prop. Quite simple to do. It is rather "basic", but you can get very complex with it.
  • You may be very interested in OmniaCreator. It's not being maintained anymore, as far as I know, but it's a great tool that I think does what you're looking for, purpose built for the Propeller: http://omniacreator.com/
  • jmgjmg Posts: 15,148
    T Chap wrote: »
    ...It is not free, but the demo is full function except you can only test in debug mode, you cant build without paying 100 a year. To me, it is invaluable.

    The 'works in debug mode' feature is nice for eval.
    The $100/year is per output generator, so it is $300 for mac linux pc

    Have you done any speed tests ? How does it compare with Delphi / FreePascal ?

    Xojo used to be RealBASIC..
    Thanks for the tip, I'm playing with Xojo now to write a cross-platform plotting terminal! See how it goes.

    Be interested to see how that goes.
    I see Embarcadero have a free version of Delphi for non-commercial use
    https://www.embarcadero.com/products/delphi/starter-faq

    and there is also Lazarus/Freepascal that can do cross platform

    http://www.lazarus-ide.org/index.php?page=downloads



  • T ChapT Chap Posts: 4,198
    edited 2017-01-12 02:58
    Yes 100 per platform to build but I assumed he only needed one platform. I never used other app creators, I found this to be very easy for me as I didn't want to learn C or any other real languages. I run 112k easily data with the Prop, I have tested faster maybe 250k-ish no problem but never had a need to go beyond that.

    Running in Debug is fine, it's just a longer load time to run Xojo versus running a much smaller build.
  • I use the Qt framework, which appears to be similar in purpose, and somewhat similar in design. The language is C/C++ for native stuff, or you can use their QtQuick / Qml script-based stuff. It's free / open source, which is nice. The GroundStation app for the Elev8 is written with it, as are SimpleIDE and PropellerIDE, among others.

    There's a learning curve, but it's worthwhile.
  • Don't forget ViewPort, which has a plotting function and can also display variable values and other information.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2017-01-12 04:45
    jmg wrote: »
    a) You can use a PC-Terminal program, and send Terminal command strings from the Prop.
    This is usually character-coarse, but may be enough for you ?

    Parallax has a tutorial which uses the Parallax Serial Terminal as a rough oscilloscope. The program used the Propeller Board of Education in the example.

    learn.parallax.com/sites/default/files/content/prop_boe/start_spin/voltage/img/pst_scope.jpg

    I modified the o'scope code to use with my pulse oximetry attempt. If you skip forward to the 1:06 mark you can (sort of) see my version of the program in action.



    The PST graph worked well enough to see my pulse.
  • Would using something like a VGA Sip adapter, if your board does not have a VGA out connection, and then use a VGA to USB adapter to display the screen on the Laptop work in this instance? The VGA Sip would also allow the output to be sent to a standalone monitor
  • ErNaErNa Posts: 1,742
    edited 2017-01-12 09:43
    I'm using Ariba's insonix.ch/propeller/prop_term.html intensively.it combines text and graphics area as well as mouse support.
    725 x 584 - 25K
  • realolman1realolman1 Posts: 55
    edited 2017-01-12 15:25
    I have been working on something that stores an analog input to an 1440 element array once per second, and a VB.net program that retrieves and displays the values on a chart.

    It's a work in progress, but if you're interested, I'll give it to you. I'm sure somebody more knowledgeable than I could modify it to work differently

    much of the spin program is other people's work that I fiddled with... I don't know if I need to acknowledge that better or not

    software's free ... visual studio community 2015
  • If you are just looking to read in the data from the serial port and then create a graphic on screen, you could use Python and wxPython to collect the data from the serial port and then create a nice little gui graphic display with something like matplotlib:
    matplotlib.org/

Sign In or Register to comment.