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:

Thursday, October 9, 2008

Test Run


I was able to hook up the motor driver to the motors and a battery last night and test it with a potentiomer. Fortunately, I had all the wiring done from a former H-Bridge project that I could never get working. Motor Driver works. Noticed that there's a couple of pieces missing from the drive trains that are causing the wheels to slip, so I'll have to fix that.

Next step was to download and install the RoboRealm software so that I could control it with the laptop.

This afternoon I installed the drivers for the USB to TTL cable and hooked the motor driver up to the laptop. After some difficulties, lack of specifics on how the RoboRealm interface works, I was able to control the motors from the RoboRealm software on my laptop. Success!

Notes: The RoboRealm software "installs" whatever "filter" you click on and reloads it every time RoboRealm is restarted. I didn't realize what it was doing and was accidentally "installing" a new Sabretooth "filter" each time. This caused the instances to conflict. You can see what filters are running in the bottom right corner window of RoboRealm. You click on those loaded "filters" to change their settings. Not the ones on the Content menu on the left. That will add another one.

I was able to control the motor from the RoboRealm software and then got my brother to show him and it didn't work! So he went away and I disconnected the power to the motor driver, reconnected it and restarted RoboRealm. It started working again and I left a motor running this time and got him and was able to show him. I stopped the motors for a minute or two and it stopped working again. It appears that there is a timeout issue between RoboRealm and the Sabretooth after a minute or two that I'll have to troubleshoot.

So now I need to install the video camera on the laptop, get into the API for RoboRealm so that I can write commands for specific movements of the robot. Ie, move forward, backwards, turn left, turn right, etc. Then I need to fix the drive trains, build a housing unit for the batteries, figure out how to wire the charger for the batteries, build a housing unit so the laptop can sit on the robot and build a platform for the video camera.

Wednesday, October 8, 2008

Motor Driver Arrives



My Sabretooth Dual 10A Motor Driver arrived today. Along with the USB to TTL Converter cable. Nicely packaged. Curtesy of SuperDroidRobots.