|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
CMU 2 cam with Vex
Hi, one of my mentors wants me to hook up a CMU cam to a vex robot. But I'm not sure how to hook up power to it? Has anyone ever done this? Should I just hook a PWM cable from the camera to the vex controller?
Thanks for the help, Nathan |
|
#2
|
||||
|
||||
|
Re: CMU 2 cam with Vex
Quote:
![]() |
|
#3
|
||||
|
||||
|
Re: CMU 2 cam with Vex
Wow, thanks. Exactly what I needed!
|
|
#5
|
||||
|
||||
|
Re: CMU 2 cam with Vex
Where could I find Kevin's code? That would really help alot!
Thanks, Nathan |
|
#6
|
||||
|
||||
|
Re: CMU 2 cam with Vex
www.kevin.org/frc
If you want any other help PM or e-mail me Haskinseric@hotmail.com. EDIT: I tested my vex with the code in frc_camera_s.zip. It may work with version 2 and/or the full version of the code, but I know the first simple version works. You will need to follow the instructions in the readme to move the code to an EDU/Vex robot. I know it says its for the EDU only, but the process to move it to a VEX is the same. Also I was using the Radio Shack programming kit, but using MPLab IDE and IFI Loader. This will work with MPLab, but I don't think its possible with EasyC, because you wont have access to the serial ports. Sorry for the long edit, but I thought of alot after I typed the my response. Again, if you want any other help PM or e-mail me Haskinseric@hotmail.com.EDIT Again: If you need a copy of the MPLab default code for a vex you can download it from http://www.vexlabs.com/vex-robotics-downloads.shtml. Here is a direct link to the file http://www.vexlabs.com/docs/vex-startup-code.zip. You can also get IFI loader from that page. Hope this helps, Last edited by EHaskins : 05-11-2006 at 22:09. |
|
#7
|
||||
|
||||
|
Re: CMU 2 cam with Vex
Thanks! And I already use MPlab so that shouldn't be a problem. By "the first simple version" do you mean frc_camera.zip?
Thanks again, Nathan |
|
#8
|
||||
|
||||
|
Re: CMU 2 cam with Vex
I used frc_camera_s.zip.
frc_camera_s.zip EDIT: You do need a different version of the default code for a vex. The code from an FRC controller will NOT work. You can download it from the link in my post above. Last edited by EHaskins : 05-11-2006 at 22:18. |
|
#9
|
||||
|
||||
|
Re: CMU 2 cam with Vex
Eric's been helping me via e-mail (Thanks Eric!), and now I've gotten the cables all hooked up. But when I try to integrate Kevin's camera code, by adding "camera.c" and "camera.h" to my MPlab project, I get the following error:
Quote:
Thanks, Nathan |
|
#10
|
|||||
|
|||||
|
Re: CMU 2 cam with Vex
That's defined in Kevin's serial_ports.c/h files.
Did you include those in your project? |
|
#11
|
||||
|
||||
|
Re: CMU 2 cam with Vex
No, I didn't. I guess that was the problem, thanks
Now, do I need to include the rest of the Kevin's .c/.h files to my project, or will just having the camera.c/h and serial_ports.c/h files be ok? |
|
#12
|
||||
|
||||
|
Re: CMU 2 cam with Vex
If you follow the instrustions in the Camera Readme, tracking readme, and the serial port readme. Your robot should be working in no time.
![]() If you are planning to write your own tracking code you don't need to follow the tracking readme to integrate tracking.c/.h/ |
|
#13
|
||||
|
||||
|
Re: CMU 2 cam with Vex
Thanks. And I've been trying to read all the readme's/.c/.h files, and is this how you track an object:
Code:
Initialize_Camera(); Camera_Idle(); Track_Color(); Thanks, Nathan Last edited by Nathan : 11-11-2006 at 16:35. |
|
#14
|
||||
|
||||
|
Re: CMU 2 cam with Vex
If you have integrated the serial and camera code properly you can put this code in porcess_data_from_master_up
Code:
Camera_Handler();// this updates the camera data. Servo_Track();// this is in tracking.c, so you must include tracking.h. Feel free to e-mail me. ![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CMU cam | Booger | Programming | 3 | 18-07-2006 00:00 |
| CMU Cam on an EDU-RC | Redneck | Programming | 2 | 11-02-2006 14:55 |
| CMU-Cam power | QuantumNinja | Programming | 1 | 01-02-2006 21:14 |
| grrr need help with my cmu cam | lilrican13 | Programming | 6 | 18-01-2006 00:14 |
| CMU Cam GUI | Arc736UV | Programming | 2 | 15-03-2005 19:26 |