Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   2006 CMUcam2 Code (http://www.chiefdelphi.com/forums/showthread.php?t=41254)

eugenebrooks 14-03-2006 20:01

Re: Problem with the past
 
Quote:

Originally Posted by Fritz
We are currently experiencing a problem getting the 2005 RC to accept any code that uses the current default camera code. It won't accept, at all, and the hex is no larger than any of our other working code... infact, the hex is smaller! If anyone can help, it'd be muuuuch appreciated.

ps. we have set it up with the old linker and even the new ones to see if it will work...

We did this without problems just in case we would need to switch
to the 2005 controller. We started with the 2005 default code,
version 2.2 without the camera code in it. We then added the 2006
camera code .c and .h files, and our own .c and .h files that handled
other interrupt based functionality, to the folder and they to the project.
You will have to delete the IFI serial driver and header from the folder
and project, and you will have to change stdio to the correct printf_lib
include. You then have to fold in your changes to user_routines and
user_routines_fast. It will work if you catch all the nits, and there
are a few.

DICKIE 20-03-2006 09:49

Re: 2006 CMUcam2 Code
 
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.


HELP!! :ahh: can we not avoid using the gear tooth sensor by setting our fischer motor, globe, etc. at a low enough speed? then when it finds the light to stop?? if this is possible, where in the code do i do this. i'm not the greatest programmer but i need to figure this one out!! if canybody can help that'd be great :)

Keith Watson 21-03-2006 11:24

Re: 2006 CMUcam2 Code
 
Quote:

Originally Posted by DICKIE
HELP!! :ahh: can we not avoid using the gear tooth sensor by setting our fischer motor, globe, etc. at a low enough speed? then when it finds the light to stop?? if this is possible, where in the code do i do this. i'm not the greatest programmer but i need to figure this one out!! if canybody can help that'd be great :)

The camera searching/tracking code is in the file tracking.c in the function Servo_Track(). You will need to read the code to understand what the algorithm is doing.

owner_master 10-02-2007 19:24

Re: 2006 CMUcam2 Code
 
ok where can i get the 2006 code for the camera i don't see in on the website. What is the file called?

JBotAlan 10-02-2007 19:29

Re: 2006 CMUcam2 Code
 
Quote:

Originally Posted by owner_master (Post 575638)
ok where can i get the 2006 code for the camera i don't see in on the website. What is the file called?

Go to: http://kevin.org/frc/ and scroll a little more than halfway down. Under the section titled "2007 FRC-RC Example Code and Utilities", there is a list of ZIP files that contain code for MPLAB. If you are writing in easyC, these probably won't be of any use to you; the easyC code downloads are at: http://www.intelitekdownloads.com/easyCPRO/ under "2007 Kickoff Demo Code".

JBot

owner_master 10-02-2007 20:08

Re: 2006 CMUcam2 Code
 
well i went there and these are the four file frc_camera_s_21.zip, frc_camera_21.zip,frc_camera_s_2.zip, frc_camera_2.zip. i am looking for one with ends in ....._2006.zip and it has to be for Mplab

JBotAlan 10-02-2007 20:17

Re: 2006 CMUcam2 Code
 
Quote:

Originally Posted by owner_master (Post 575658)
well i went there and these are the four file frc_camera_s_21.zip, frc_camera_21.zip,frc_camera_s_2.zip, frc_camera_2.zip. i am looking for one with ends in ....._2006.zip and it has to be for Mplab

Kevin has updated his site. The files you see are the replacements for the old '06 stuff. If you are looking to base your code off of Kevin's code, you probably want frc_camera_21.zip, and if you are looking to integrate camera code into an existing project, you probably want to get the streamlined version, frc_camera_s_21.zip. It depends on what you are using it for.

JBot


All times are GMT -5. The time now is 11:56.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi