View Full Version : Camera & Default Code
Lablabla
12-01-2007, 11:43
Hi,
The zip file downloaded (Camera streamlined version from kevin.org/frc) contains everything, the user_routines.c and all that. should i use this as the default code for 2007 and add my autonomous mode and joystick controls and all that to that files? or is there a way to add the camera thingies to the 2007 Default code?
Plus, If I Remember correclty, the readme.txt file says that serial_port.c or something like this, also available at kevin.org/frc need to be installed, I downloaded that file, and again, it contains all the user_routines.c and stuff, what is going on? can someone explain to me how to mix up all the files so i can get the camera working with my default code?
Thanks,
Carmel
Yes, you can use that as your default code very easily. You do not need to add the serial port code to it because it is already there. The readme is there so that people who want to copy over only the camera related portions of the code know what needs to be included to get it to work.
Lablabla
12-01-2007, 12:47
So basically,
I open the camera.mpw and work on the user_routines.c and stuff as if it was my default code?
Thanks
Carmel
You can definitely do that.
Kevin Watson
12-01-2007, 12:59
Hi,
The zip file downloaded (Camera streamlined version from kevin.org/frc) contains everything, the user_routines.c and all that. should i use this as the default code for 2007 and add my autonomous mode and joystick controls and all that to that files? or is there a way to add the camera thingies to the 2007 Default code?
Plus, If I Remember correclty, the readme.txt file says that serial_port.c or something like this, also available at kevin.org/frc need to be installed, I downloaded that file, and again, it contains all the user_routines.c and stuff, what is going on? can someone explain to me how to mix up all the files so i can get the camera working with my default code?
Thanks,
CarmelI'll update the zip files with IFI's newer linker script and library file this weekend. If you can't wait, drop IFI's newer linker script files (*.lkr) and library files (*.lib) into your build directory and you should be in good shape.
-Kevin
Lablabla
12-01-2007, 13:28
I will wait,
what zip file? the one for the camera?
and then what will i have to do to get working on the complete code (including camera and everything, the code that will be used in the competition)?
Thanks,
Carmel
Kevin Watson
12-01-2007, 14:07
I will wait,
what zip file? the one for the camera?
and then what will i have to do to get working on the complete code (including camera and everything, the code that will be used in the competition)?
Thanks,
CarmelThe software in the frc_camera_2.zip and frc_camera_s_2.zip files contains IFI's default code plus camera code that will find and track the green lights. In the next few days I'll update the code to also include a new PWM driver that will give you more control over your servos and cure PWMs 13-16 of their jitter.
-Kevin
Lablabla
12-01-2007, 14:18
Thanks, that's what i was looking for
Where can i find out when you've updated the file?
Thanks,
Carmel
You can find it on Kevin's website.
http://kevin.org/frc/
dmellich
16-01-2007, 16:04
We have managed to get the camera tracking beautifully. Thanks so much Kevin. I have a question though.
We were able to change the PWM's that the servo's use (PWM01/PWM02) to PWM07 and PWM08. Everything still works fine i.e. camera tracks. Our question is, where do we set PWM01/PWM02 so that they are now free for us to use with a joystick (y-axis) vis-a-vis the default non-camera code. Thanks for your help.
Lablabla
16-01-2007, 17:16
If I understood your question:
in the project downloaded from kevin's site
the Default_Routines() function in the user_routines.c is commented
uncomment it (where it's being called) and edit it at the bottom of user_routines.c
you decide what pwm is for what joystick axis at that file too.
If I didn't get your question right, forgive me and ignore the answer
Carmel
Kevin Watson
16-01-2007, 18:33
...Our question is, where do we set PWM01/PWM02 so that they are now free for us to use with a joystick (y-axis) vis-a-vis the default non-camera code. Thanks for your help.I think Q22 in the CMUCam2 FAQ (http://kevin.org/frc/camera/) answers your question. If not, please let me know.
-Kevin
dmellich
16-01-2007, 19:15
Kevin, I remember reading through your Q&A and seeing that. My apologies for not paying better attention. Thanks again for your help.
michael714
28-01-2007, 18:10
Dear Kevin,
We are using your edu_camera.zip code with our EDU and it's working perfectly. You are awesome! Thanks.
Of course, the question comes to my mind, are we missing anything by not using the frc_camera21.zip code? The newest date on the files in the edu zip is 1/22/06 and it looks like you've updated several files since then in the 21 zip.
Is the only difference between the camera21 and the edu code just the linker and lib files because of the different PIC?
Your time and efforts are greatly appreciated.
Kevin Watson
28-01-2007, 18:25
Dear Kevin,
We are using your edu_camera.zip code with our EDU and it's working perfectly. You are awesome! Thanks.
Of course, the question comes to my mind, are we missing anything by not using the frc_camera21.zip code? The newest date on the files in the edu zip is 1/22/06 and it looks like you've updated several files since then in the 21 zip.
Is the only difference between the camera21 and the edu code just the linker and lib files because of the different PIC?
Your time and efforts are greatly appreciated.Looks like a few people want to use the EDU-RC with the camera, so I'll look into updating the EDU build with newer camera code. My kids are trying to drag me off to the "Epic Movie", so it'll be tonight or tomorrow before anything is up.
-Kevin
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.