HexCrawler
Pengatom
Posts: 21
Hi
I've upgraded(?) my HexCrawler from a BasicStamp 2 to a JavelinStamp microprossesor. Now I'm trying to put the new java code together since I have'nt found it·anywhere on Parallax's pages or her on the forums.
For now I've just programed it for testing just one servomotor with the PSC. The thing is though, when I move the joystick, it takes almost 2 sec before the servo motor moves.
I've tried to do many commands in a row, and the Javelin remembers and excecute everyone, but it has this 2sec delay...
Is it anyone who have had similar problems and know how to speed up things?
I'll attach my work so far
regards
Trond
I've upgraded(?) my HexCrawler from a BasicStamp 2 to a JavelinStamp microprossesor. Now I'm trying to put the new java code together since I have'nt found it·anywhere on Parallax's pages or her on the forums.
For now I've just programed it for testing just one servomotor with the PSC. The thing is though, when I move the joystick, it takes almost 2 sec before the servo motor moves.
I've tried to do many commands in a row, and the Javelin remembers and excecute everyone, but it has this 2sec delay...
Is it anyone who have had similar problems and know how to speed up things?
I'll attach my work so far
regards
Trond
Comments
I had the same sort of problem when I started programing my Javabot, what solved this problem for me was increasing the baud rate. I don't have my code with me (i'm at work) but I will post the code when I get home tonight.
-Jon
Here is the code you have been waiting for...
I create 2 uarts (one for the initial baud, and one for the faster baud) something like this.
Then at the start of my main I send the psc the update baud command like this...
You can then use the txUart for all further communication at the new higher baud.
I added this to your existing code, and attached it. I plan on posting alot of this stuff on my website, but haven't had the time to do it yet. When I do it will be available HERE (currently it has pictures and information about my JavaBot.)
I am not where I can test this, so if it doesn't work please forgive me.· this would just seem to eliminate the generation of an additional VP , which are at a premium.
Kevin
I tried your idea with some of my code, and it works great, thanks for the tip. I guess I haven't had a problem with running out of VP's yet so I wasn't aware of the uart restart. Thanks again for the tip!
-Jon
· Great! Glad it worked, I am always hesitant to suggest something with out trying it first.· Most of the time one would not run out of VPs, there are only six·allowed to run at a time though.· I mean no offense when I say this, I just think it is cleaner code.· No reason to create something that you use once and never use again.
· Love your robot by the way, my son thought it was cool too; he liked how it followed the light in the video on the web page.
·
Kevin
P.S. That does pose·another question, has anyone written classes to use the PSC?