View Single Post
  #7   Spotlight this post!  
Unread 06-27-2007, 12:56 PM
TheOtherGuy's Avatar
TheOtherGuy TheOtherGuy is offline
Unregistered User
AKA: Kevin Forbes
FRC #4183 (Bit Buckets)
Team Role: Engineer
 
Join Date: Jul 2006
Rookie Year: 2006
Location: Tucson, AZ
Posts: 408
TheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond repute
Re: pic: 1726 Demo Bot

I found out how to connect the camera to the microcontroller via this post. You basically connect the TTL port on the camera to the tx and rx ports on the vex microcontroller (which are on the same side as the ana/dig inputs). The camera does a lot of processing itself, and it returns a bunch of variables, including the pan angle for the pan servo and the center of the mass. Using EasyC Pro made getting the camera to work a breeze, all you have to do is make some unsigned characters and assign them to whatever the camera returns.

The pan system is only half of the drive system, you need the tilt to figure the disance from the object. The farther away, the lower the angle, the closer, the steeper the angle.

We got it so it'll drive arcade mode to drive up to the light, so it combines the two values and figures the value for each motor. We just made the rubber band gun fire when the robot was happy with it's position.

That's pretty much all there is to it! I found out vex doesn't work too well with the camera because the motors don't provide as much control as you want (ie adding a pid loop made the robot stop short of it's goal, and then 5 seconds later JUMP forward several inches. We never quite got it to accurately tell the distance...)
__________________
Reply With Quote