Thursday, October 16, 2008

Coding

I was able to get the motor to work through RoboRealm and I then wrote code in Java to interface with RoboRealm to begin writing some more sophisticated applications for the robot. In doing so I came to wonder why I was writing Java code to call the RoboRealm application to send commands to the motors. Wouldn't it be more efficient to just control the motors directly from Java? So I found the Java COMM API (with much searching and just stumbled on a new one RXTXcomm.jar that I may want to try) and wrote the code to control the motors from Java directly through that interface. Unfortunately, when I tested the code it didn't work. So rather than bang my head on that one for untold hours I just went back to the Java/RoboRealm interface.

The plus side of this is that the RoboRealm "API" is a loosely based (sorry, closest comparison I can think of, apologies to both sides) SOAP server. So I can run my application from anywhere on the network to connect to the RoboRealm. Saves me the trouble of writing a socket app myself (webapp or otherwise) to control the robot remotely.
So now I have the nifty little basis of a robot application ready to go:

No comments: