Javelin eb500 Code
Chris Davidson
Posts: 1
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
Check this thread:
http://forums.parallax.com/showthread.php?p=469259
regards peter
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
Soon as i can upload code to my bot again i will give this a whirl!
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