Javelin Stamp Module -> comunnicate with PC java application?
Tygo
Posts: 1
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.
Problem 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.
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.
Problem 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.
Comments
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.
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
http://forums.parallax.com/showthread.php?p=544882
http://forums.parallax.com/showthread.php?p=555000
regards peter
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