View Full Version : BS2/Java
04-16-2007, 07:22 AM
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!
04-16-2007, 07:52 AM
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).
04-16-2007, 10:50 AM
Do you know which Java package I might need to look in for creating serial ports?
04-16-2007, 10:56 AM
Sorry, I don't know much Java.
04-16-2007, 11:08 AM
Thank you very much for the head start, Mike Green
04-16-2007, 03:43 PM
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: