View Single Post
  #16   Spotlight this post!  
Unread 14-01-2006, 03:41
Joe Hershberger Joe Hershberger is offline
National Instruments
AKA: jhersh
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 1997
Location: Austin, TX
Posts: 148
Joe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to all
Re: 2006 CMUcam2 Code

Quote:
Originally Posted by Vashts6583
Question 2: I like the fact that we have code, but what after calibrating the camera, what files would I need to add to the main workspace (MPLab IDE C18) that I am using for the robot?
Well, it would appear that at first glance the "streamlined" version of the camera software will be the most useful for use on a live robot. In that code you'll find a header file called camera.h. It should contain a whole string of constants that configure the camera. You can use the LabView CMU camera app posted in this thread to test the camera and figure out just what parameters you'de like to use. Then plug those numbers into the header file, and you should be good to go.

Quote:
Originally Posted by Vashts6583
Question 3 (ties in with question 2): Proving to the world the fact that I am a n00b programmer, how would I be able to re-program the code for the servos for another type of motor? I know that the code for servos differs from that of say a fisher price or a globe motor.
As for replacing a servo with a different type of motor, that is a bit of a challenge. Servos have internal feedback which allows you to tell it to go to a particular position. You may notice that if you have a servo powered and you try to turn it, it fights back to keep the position the same. The servo just has a small motor inside, a controller, and a sensor for feedback. If you want a globe or fisher price motor to act like a servo, then you need those other two components. You can use a sensor like the Gear Tooth Sensor included in the kit as your feedback. For the controller, you can use the FRC and write software! The motor controllers that have available, (victors, and of less usefulness, the spikes) only control the speed of the motors, not the position. This is because they don't know where they are, and therefore don't know where to go from there (where?). Hopefully the servos will work for you, but if not, it's possible to use other motors instead. It's just a lot more work. If you decide you do need a controller and motors, do some research/googling for PID control. It's a pretty straight forward method of control that gives good results. There's probably even code floating around out there if you look hard enough.

Good luck!!

-Joe