Shop OBEX P1 Docs P2 Docs Learn Events
Need help with Javelin and Stamp Plot Pro — Parallax Forums

Need help with Javelin and Stamp Plot Pro

ironstarironstar Posts: 2
edited 2005-09-18 13:15 in General Discussion
I am trying to display a triangle wave on stamp plot pro with this code:

...
public static void main()
{
· while( true )
· {
···· for( int i = 0; i <255 ; i++ )
···· {
········· System.out.print(i) ;
···· }

···· for( int j= 255; j>=0 ; j++ )
···· {
········· System.out.print(j) ;
···· }
·· }
}

I have tried printing the carriage return character immediately after each print statement and the plot does not come out right.· If anyone has experience with plotting on Stamp Plot Pro or Stamp Plot Lite, please help.· I have tried adding CPU delays, changing serial baud rate, changing sample size all with very little improvement.· The graph looks more like a seismograph.· If you have any ideas, please share.
-ironstar

Comments

  • bxgirtenbxgirten Posts: 79
    edited 2005-09-15 19:35
    Have you tried?

    public static void main()
    {
    while( true )
    {
    for( int i = 0; i <255 ; i++ )
    {
    System.out.println(i) ;
    }

    for( int j= 255; j>=0 ; j++ )
    {
    System.out.println(j) ;
    }
    }
    }
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2005-09-16 06:47
    You can't use System.out to send data to any pc program (like Stampplot) that is not written

    for communicating with the javelin. The data out of the JIDE port (addressed by System.out)

    contains metadata inbetween the data you send in your program. So, consequently Stampplot

    treats the metadata as regular data, corrupting the Stampplot output).

    You must use a regular Javelin I/O pin and Uart object to send data to Stampplot.

    regards peter
  • ironstarironstar Posts: 2
    edited 2005-09-18 03:39
    Here is my setup:

    I have the Javelin in a BASIC Stamp Super Carrier board.

    I am using the board to program the Javelin through a serial to usb port.

    I have been able to program and run the sample programs.

    I want to use Stamp Plot Pro to plot data through the existing serial port.
    I was trying to test out Stamp Plot Lite; according to the website I should send data followed by the carriage return character, and it will recognize and plot it. I have not been able to display any output with Stamp Plot Lite. I tried Stamp Plot Pro and was able to output something resembling a ramp function. What I want to do is plot a triangle function, so I wrote a program to loop from 0 to 254 and print ( I have tried System.out.print & println ) the value then do the same thing going from 255 to 0.

    Peter, I tried the Uart objects, but it seems like I would have to build a serial port circuit and connect a designated output pin from the Javelin to the serial port, and connect the new serial port to the computer running Stamp Plot Pro.

    Is there any way I can use the serial port from the carrier board to output and plot data?

    If anyone has any ideas, please comment.

    -ironstar
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2005-09-18 13:15
    Yes, you do need to build a serial port circuit.

    You can however use JideDebug or JideTerm

    http://groups.yahoo.com/group/JavelinCode/files/

    to log data, send from Javelin, to a file.

    JideTerm is also available as a windows version.

    I don't know Stampplot, but if you can open a file

    of stampplot data with it, that may help you.

    For a 'live' connection between stamppplot and the

    javelin you need the serial port circuitry.

    regards peter
Sign In or Register to comment.