TrackBot
Howdy Folks,
Here's a video of a project I did for·an introduction to·programming course.·
http://www.youtube.com/watch?v=CguCTJyuJpo
I originally used the programming on a BoeBot before I switched to the tank platform, hence the TrackBot,·though its probably·better described as·a small unmanned ground vehicle.
As my first attempt at programming, the code is very basic.· I'm looking forward to learning more so I can streamline things as well as add more bells and whistles.
Future "bells and whistles" include using the arrow keys of the laptop for motion control and the mouse for camera control.· 1st Person Shooter style!· Hardware upgrades will be the addition of sensors other than the camera.· Ping)) and maybe a gps.
Here's a video of a project I did for·an introduction to·programming course.·
http://www.youtube.com/watch?v=CguCTJyuJpo
I originally used the programming on a BoeBot before I switched to the tank platform, hence the TrackBot,·though its probably·better described as·a small unmanned ground vehicle.
As my first attempt at programming, the code is very basic.· I'm looking forward to learning more so I can streamline things as well as add more bells and whistles.
Future "bells and whistles" include using the arrow keys of the laptop for motion control and the mouse for camera control.· 1st Person Shooter style!· Hardware upgrades will be the addition of sensors other than the camera.· Ping)) and maybe a gps.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lets see what this does... KA BOOM (note to self do not cross red and black)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
I what did you use to program the GUI on your PC?
This was my first attempt at writing code so my approach was to keep things as simple as I could.
When the button on the GUI·is pressed down (mousedown event) it sends a number to the com port where the bluetooth dongle lives. The number is received by the stamp via the EB500 and put into·a variable named CmdData.· The stamps looks at CmdData and runs·the subroutine that corresponds with the number.· When you stop pressing the button (mouseup event) it sends a "0" which·runs the·Halt subroutine.·
For the video feed I'm using whatever software that came with the camera, though I wouldn't mind incorporating it into future versions of my VB program.
I can use a scroll bar to send a sort of analog control to you tank so you could control speed with the scroll bar. You want me help with that?
I added this Slider Example program I use to control a older robot I had. The Serial code has been took out for the motor on and off buttons and some other things are left out so you can send them to your BS2 in the format you are using.·Let me know if you ike this also you an add a third Scroll bar to control both motors at the same time and·you can use the offset of the other two scroll bars to keep it going straight if·your servos·not a perfect match.
What type of camera do you have mounted and how fast does it·refresh the image on your screen?
Post Edited (bennettdan) : 5/21/2007 6:37:15 PM GMT
I like the camera mounted on your robot, where did you purchase it?
Rob7
· I have a small app to use the arrow keys to update a textbox but just send your data where the textbox1 update is.
The quality and range are not quite as good as advertised but it was the only model in the price range that was wireless, built in battery and usb with dvr software.
Bennettdan,
Thanks for the code examples.· Are you a programmer by trade?· I'll send you a PM later today to pick your brain if that's ok.
I am a PLC and HMI interface programmer at my present job, but I have to interface with the companys database for box tracking data so I have ssome experience in the programming in .net. My email adress is bennettdan@bellsouth.net and its my windows messenger username.
· Hey I like the cam and might like to have one myself...I see in your video you have to open you VB.net program to control your bot and also you have to open a window to see your cam..
If the cam interfaces just like a web cam this program might work for you and it will be on ne form the picturbox should show your cam image in it and then you can send out the controls with the buttons.
Also I modified your BS2 code to hault when the BS2 is not recieveing a Cmd bit so you wont need the mouse button up and button down actions it will move when you press the button nd hen stop when you let off...its a little cleaner.
Look at the haults in the Main loop on the BS2 code I attached.
Hope you like it..
Post Edited (bennettdan) : 5/23/2007 1:27:10 AM GMT
instead of:
Good catch I had it backwards..I dont know why I did that..OOps
Well I have corrected it and reposted the code it should work fine now. Thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
http://www.hobbytron.com/AirsoftRCSnowLeopardBattleTank.html