Interfacing a Sabertooth with a basic stamp 2 and roborealm for a robot

Robotics

Citation
, XML
Authors

Abstract

How to use roborealm with a camera on your robot that is running a BS2 and sabertooth.

Lots of people build robots but also they don’t prioritize their parts list with the correct pricing of components and their quality. For example in my build I had a RC tank and I took out the guts and was left with the motors, threads, and the body. I put in a Sabertooth 2X5 which is a pretty high end H-Bridge and a low end MCU which was the Basic Stamp 2. I also wanted to use a webcam for some vision processing  such as dectecting a wall or colors. Interfacing all of them was not easy since Googling any of these parts working together other then Roborealm and the sabertooth turns up nothing.

On the Basic Stamp put in a program that is a simple “controll” using the DEBUGIN function. Connect the Stamp to the Sabertooth like you would do normally using your preferance of serial communication or PULSOUT. Don’t forget to set the dip switches on the sabertooth to the proper function!

Then on the computer using the debug console/terminall test if your code works correctly by using keyboard keys to send a character to the basic stamp. I used the wasd idea, but instead of the letters I used the numbers 5,1,2,3 on the keypad.

All seems like the normall way to run a bot using the basic stamp 2 and the computer but this is where the roborealm comes in. In roborealm there is the option to run a VBScript and using that you type up a script that uses the WshShell.Sendkeys component. And then send the keys to the debug window of parallax’s software.

There you go, getting all the programs to interface correctly. I know that roborealm has the function to send serial data but I was not able to get it work correctly getting the error “Cannont stablish a connection”, also you could get rid of the BS2 and useing a TTL converter IC but then interfacing all the sensors would prove to be difficult and more work.