Shop OBEX P1 Docs P2 Docs Learn Events
BS2/Java — Parallax Forums

BS2/Java

DosEdgeDosEdge Posts: 33
edited 2007-04-16 08:43 in BASIC Stamp
Can anyone tell me if it is possible to transfer data from the BS2 into a Java program? If so, where do I need to begin!

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-04-16 00:52
    Generally people transfer data from a BS2 into some kind of "host" computer by using a serial port on the "host". Have a look at the sections of the PBasic manual on the SERIN/SEROUT statements. You will need to be able to open a serial port in Java and read strings of information sent by the BS2 using SEROUT statements in whatever format you decide/require. The BS2 is pretty flexible in converting information into text strings. You will probably need to send information back to the BS2 the same way using a SERIN statement (mostly to let the BS2 know the previous information was received properly).
  • DosEdgeDosEdge Posts: 33
    edited 2007-04-16 03:50
    Do you know which Java package I might need to look in for creating serial ports?
  • Mike GreenMike Green Posts: 23,101
    edited 2007-04-16 03:56
    Sorry, I don't know much Java.
  • DosEdgeDosEdge Posts: 33
    edited 2007-04-16 04:08
    Thank you very much for the head start, Mike Green
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2007-04-16 08:43
    Not to discourage you in any way, but Java is not the easiest language for beginners to create a desktop application with.

    If you absolutely need (or want) to use Java, check out the Netbeans IDE. As for serial ports, any version of Java that you can use with Netbeans should support the required classes for serial port access. You'll need to do some digging, however, to figure out what & how to use those classes.

    If you don't absolutely need to use Java, my suggestion is to use one of the Microsoft Visual Studio Express languages, such as Visual Basic. You can download it for free, and it is much easier to build an application than with similar Java tools. There are some code samples floating around on these forums, too.

    Here are some links to check out:
    www.netbeans.org
    msdn.microsoft.com/vstudio/express
Sign In or Register to comment.