Shop OBEX P1 Docs P2 Docs Learn Events
Javelin eb500 Code — Parallax Forums

Javelin eb500 Code

Chris DavidsonChris Davidson Posts: 1
edited 2006-12-02 04:28 in General Discussion
Can anyone tell me how to get a Javelin chip working with the eb500 (http://www.parallax.com/detail.asp?product_id=30068). I havent seen any code for it and I cant get to http://groups.yahoo.com/group/JavelinCode/ to see if they have any for it.

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-12-01 21:08
    There is no class I know of.
    Check this thread:
    http://forums.parallax.com/showthread.php?p=469259

    regards peter
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-12-01 21:13
    I searched my harddisk and found these two classes.
    It looks I did wrote a class. Have not tested it as I don't
    have EB500 modules.
    Please try them and give any feedback.
    Save files in lib/stamp/peripheral/wireless/eb500/

    regards peter

    Post Edited (Peter Verkaik) : 12/1/2006 11:11:17 PM GMT
  • Scott CScott C Posts: 12
    edited 2006-12-02 03:45
    Way cool Peter. I started writing an eb500 class myself, but so far i have only changed between the module's data and command mode and check its status. OOOoooo [noparse];)[/noparse]
    Soon as i can upload code to my bot again i will give this a whirl!
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-12-02 04:28
    I checked the classes and all it does currently, is creating
    the command string based on an integer value. I did this
    because there is a limit on the number of static strings per class,
    as well as on the number of methods per class.

    I changed the send() method to
    · private int send(int k) {
    ··· int i=0;
    ··· //if (sendbuf[noparse][[/noparse]k]!=0) return -1;
    ··· //Format.printf("%s\n",sendbuf);
    ··· while (i!=k) tx.sendByte(sendbuf[noparse][[/noparse]i++]);
    ··· return k;
    · }

    so it really transmits the command. The lines I commented out where for checking
    if the string was assembled correctly, which it was, for all commands.
    That's why my test class had all the commands, to test the assembled commandstring.

    For normal operation you would use
    ··· eb.sendCommand(eb.Connect,addr); //command
    ··· while (!eb.response()) ;· //wait for response

    combinations (eg. wait for a complete response).
    The way response() works now, it lets you perform other tasks if
    you want that.
    while (!eb.response()) {
    · //do some other task while waiting for the response
    }

    regards peter



    Post Edited (Peter Verkaik) : 12/2/2006 4:35:11 AM GMT
Sign In or Register to comment.