Shop OBEX P1 Docs P2 Docs Learn Events
Javelin Stamp Module -> comunnicate with PC java application? — Parallax Forums

Javelin Stamp Module -> comunnicate with PC java application?

TygoTygo Posts: 1
edited 2006-06-10 07:05 in General Discussion
Hello,

I have a general question about the Javelin language/board.

I am a web programmer quite new to java ( buzzy reading ) and (beginner) to the electronics. ( done some in the past )

I've searched the internet and your site for some information about the communication with serial/usb ports to the Javelin board/chip, and failed to find what i need.

smhair.gifProblem to be solved:
I want to make a java program which can communicate with the Javelin Stamp Module.
I'm not talking about programming the Javelin Stamp Module ( i've readed the manuals ) but :
- read variables from it
- set variables
- executing functions
- getting classes?
....in java environment on any operating system.

I know it's possible by sending electronic signals to the printer/com port of the PC, but ..

Is it possible by the usb/com port which normally used for programming the chip?
Is there a java library which can set and read data from the basic stamp ,real time?

Example
A door security system. ( see file )

If someone opens the door a sensor sends a signal to the Javelin Stamp Module.
The Javelin Stamp Module shows a "welcome" message on a LCD display.
THEN....
The Javalin Stamp Module sends a signal "door open"( like a var or something else) to the PC.
On this PC is a java programm running, which can read/send data to the Javalin Stamp Module.
The Java programm on the pc Sends out a sound signal thru the Sterio , and e-mails me that someone's entered the
building.
500 x 500 - 41K

Comments

  • Kevin WoodKevin Wood Posts: 1,266
    edited 2006-06-09 19:48
    You shouldn't have any problems doing this, except perhaps for getting classes, which depends on what you're trying to do.

    However, you can't do any of it if you don't program the Javelin.

    Just to let you know, you don't need to use a Javelin just because you are using Java on the PC. In this scenario, you are programming 2 devices to talk to each other. Each must be programmed, in whatever language supported/chosen, individually.

    If you are new to electronics, you might consider doing this project with a Basic Stamp 2 of some sort. There is considerably more info available, especially for beginners, and there are more pre-packaged options to get you going than with the Javelin.

    Also, Java on the Javelin is probably easier to work with for an experienced Java developer, since there are some differences.

    Parallax will tech support you either way, however.
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-06-09 20:06
    I have written a class JideTerm that allows you to send
    commands to the javelin, much like dos command lines.
    It has a parse() method that puts commandline arguments
    in a char array. If you want to retrieve variables or start
    methods you need to implement that in your javelin program.
    It is not possible to retrieve classes from the javelin as these
    are stored in· a special binary form in the javelin onboard eeprom.

    Also note that that the javelin ide port has a very specific protocol.
    I attached a program that deals with this protocol. You must
    implement it in your pc java program to communicate using
    the jide port.


    regards peter
  • WaldoDTDWaldoDTD Posts: 142
    edited 2006-06-10 02:51
    this looks familiar eh?
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-06-10 07:05
    Here is an example of a javelin command interpreter.
    It supports commands add,sub,div and mul but only add is fully implemented.
    The output of the program:

    JideCommand_example program
    Enter command: sub
    executing command sub...
    Enter command: mul
    executing command mul...
    Enter command: div
    executing command mul...
    Enter command: Div
    invalid command
    Enter command: div1
    invalid command
    Enter command:
    invalid command
    Enter command: add
    executing command add...
    missing arguments
    Enter command: add 1
    executing command add...
    not enough arguments
    Enter command: add 1 2
    executing command add...
    result is 3
    Enter command:

    regards peter
Sign In or Register to comment.