Shop OBEX P1 Docs P2 Docs Learn Events
Converting code help — Parallax Forums

Converting code help

Twilight_AngelTwilight_Angel Posts: 11
edited 2009-05-06 15:18 in General Discussion
Here is a code I created in JCreator to open up a program and then close it. Can any one help me convert the code so I can use it with the Javelin Stamp?

picforforum.jpg

Post Edited (Twilight_Angel) : 5/4/2009 3:25:21 AM GMT

Comments

  • jmspaggijmspaggi Posts: 629
    edited 2009-05-04 12:32
    Hi,

    Can you please clarify what you want to do?

    Is it a java program for your own computer? Or are you expecting to convert Outlook in Java, upload it in the Javalin, and have it running with no keyboard, no screen and 16Ko of memory? Or do you want the Javelin to start Outlook on your computer from outside?

    JM
  • Twilight_AngelTwilight_Angel Posts: 11
    edited 2009-05-04 18:17
    I am creating a water monitoring system. Once the water level reaches a certain height, a signal will be sent using RF Transmitter/Receiver. A Boe-Bot with the Javelin Stamp, will receive the signal. Once it receives the signal, I need the Javelin Stamp to open up Outlook. This is the code in JCreator, but when I tried to copy it to the Javelin Stamp, it said that it can not find BufferedReader, Runtime, or Process.

    Really, all I need is to open up Outlook when the Boe-Bot receives a signal.

    Post Edited By Moderator (Chris Savage (Parallax)) : 5/6/2009 3:19:20 PM GMT
  • jmspaggijmspaggi Posts: 629
    edited 2009-05-04 18:22
    Hi,

    Outlook is a Windows Micro$oft software running with (usually) an Intel processor. Unless you have a specific Javalin Outlook version, you will not be able to do so.

    What you will need it the Javelin to send a message to a computer, which will monitor an RS-232 port, and which will open Outlook when he received a signal. But your Javelin will not be able to open Outlook itself.

    So you will have to do something like:
    Water monitor -> Javelin -> Computer.

    JM
  • Twilight_AngelTwilight_Angel Posts: 11
    edited 2009-05-04 18:25
    Ok, how would I go about sending a message to the computer using the Javelin Stamp?

    Post Edited By Moderator (Chris Savage (Parallax)) : 5/6/2009 3:19:29 PM GMT
  • jmspaggijmspaggi Posts: 629
    edited 2009-05-04 18:33
    "Simply" connect an RS-232 from you Javelin to your computer. You can use the one you already use to program the Javelin and monitor the console, or you can implement an Uart into the Javelin and send the data through it. A 2 wire connection between your computer and your javelin will be enought.

    Then on your computer side, using Javax.comm, monitor the comm port to read all what is coming. Don't forget to configure them both at the same speed, parity and stop.

    Between your javelin and your computer, implement a protocol so both of them will "talk" the same language.
  • Twilight_AngelTwilight_Angel Posts: 11
    edited 2009-05-04 19:29
    Thanks for your help. It was what I was looking for.

    Post Edited By Moderator (Chris Savage (Parallax)) : 5/6/2009 3:19:36 PM GMT
  • Twilight_AngelTwilight_Angel Posts: 11
    edited 2009-05-05 04:17
    I am still having some trouble finding the comm port. It should be comm 1. If you go to this web site, it provides the code to find if a port is in use. I am running my Boe-Bot while searching for a port in use.

    www.java2s.com/Code/Java/Development-Class/PortSniffer.htm

    If you look at the bottom of the page, it gives other codes to use that involve the serial port.

    Post Edited By Moderator (Chris Savage (Parallax)) : 5/6/2009 3:19:42 PM GMT
  • jmspaggijmspaggi Posts: 629
    edited 2009-05-05 12:04
    Start here: http://java.sun.com/products/javacomm/

    Download it. install it properly, and run the samples. One is to detect the ports. You don't need to have anything runing to the ports to have them detected. But you need to close all the programs which are using the ports, like and Palm-like sync application, etc.
  • Twilight_AngelTwilight_Angel Posts: 11
    edited 2009-05-06 01:28
    Thanks again, I got to work this time. On another note, the stamp does not have to be Javelin.

    Post Edited By Moderator (Chris Savage (Parallax)) : 5/6/2009 3:19:48 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-05-06 15:18
    Banner graphics in signature lines are not allowed as per our forum guidelines. I have disabled the signatures in the messages above. Please remove the graphic element from your signature line in the control panel. Thanks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
Sign In or Register to comment.