Go to Post Now, everyone knows that Oompaloompas are like bunnies in that they have an insatiable desire to multiply, and the same can be said with Michigan teams (with all due respect) which are currently multiplying and filling that hand-shaped democratic kingdom with their honorable number. - Eugenia Gabrielov [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-02-2007, 16:24
razzoc razzoc is offline
Registered User
no team
 
Join Date: Feb 2007
Location: Canada
Posts: 2
razzoc is an unknown quantity at this point
Using kevin's code for driving and camera tracking

We am using Kevin's 2.1 Camera Code: Bells and Whistles version and could use some help with getting the driving and the camera tracking to work. We are using MPLab rather than easyC since most of us are used to MPLab.

So, looking around the forum, I found that I have to uncomment Default_Routine() to get the driving to work. I realize that this raises other problems like pwm outputs interfering. I have the all the configuration settings to fine-tune the camera tracking, and it works in the CMUCam2 GUI. I was also able to get the driving to work individually with the code provided by IFI. Now the problem is to get them to work together.

I'd like to know what else I would have to modify to make the code work smoothly. I have read alot of threads by people who have problems getting the camera tracking to work, but I still couldn't find a clear answer. Btw, I am using the default pwm outputs (Camera: 01, 02) (Drive motors: 13, 15). From what I've read, pwm ports 01 and 02 interfere with default_routines() being uncommented so what exactly do I need to edit?

This is our first year in the FRC competition so any help would be appreciated.

Last edited by razzoc : 08-02-2007 at 16:32.
  #2   Spotlight this post!  
Unread 08-02-2007, 17:17
marccenter's Avatar
marccenter marccenter is offline
Registered User
FRC #3548 (RoboRavens2)
Team Role: Coach
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Royal Oak
Posts: 406
marccenter has a spectacular aura aboutmarccenter has a spectacular aura about
Re: Using kevin's code for driving and camera tracking

Here's what I have done so far. I have reassigned the
joystick #1 y-axis parameter (p1_y) to go directly
to pwm03 and pwm04. You can see that I have commented
out the calls to pwm01 and pwm02 since we are using
them also for the camera. Since pwm03 and pwm04
are the same value, the drive motors must be set up
so that they both drive in the same direction when
connected. I hope this helps. I haven't tried it yet
in our robot, but I think it should work.

/*---------- Analog Inputs (Joysticks) to PWM Outputs-----------------------
*--------------------------------------------------------------------------
* This maps the joystick axes to specific PWM outputs.
*/
//pwm01 = p1_y; /* Camera Pan Servo */
//pwm02 = p2_y; /* Camera Tilt Servo */
pwm03 = p1_y; /* was pwm03 = p3_y */
pwm04 = p1_y; /* was pmw04 = p4_y */
__________________
Marc Center
FIRST FRC Mentor/Coach - Team 3548 Royal Oak RoboRavens#2 - on Sabbatical 2017 season
marc.center@gmail.com
Mobile: 248-255-7377
  #3   Spotlight this post!  
Unread 16-02-2007, 21:01
DotCom's Avatar
DotCom DotCom is offline
Productive Procrastinator
AKA: Christine
FRC #0692 (The Fembots)
Team Role: Alumni
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Sacramento
Posts: 47
DotCom is on a distinguished road
Re: Using kevin's code for driving and camera tracking

mm, yeah. We were wondering the same thing.
__________________

Team 692's Website
  #4   Spotlight this post!  
Unread 18-02-2007, 08:50
paulcd2000's Avatar
paulcd2000 paulcd2000 is offline
Accidentally speaks in C
AKA: Paul Dagnelie
FRC #1719 (The Umbrella Corp.)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Baltimore
Posts: 368
paulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the rough
Send a message via AIM to paulcd2000
Re: Using kevin's code for driving and camera tracking

basically, comment out everything that changes pwm01 and pwm02 in process_data_from_uP (including defult routine) after your camera code
__________________
"People don't say 'It's just a game' when their team is winning!" -- Scott Adams

5.5 students (on average)* $7/h *210 hours/student= $8085 of labor, all volunteered (not counting mentors', who are each that much)

We have blades on our robot?! ***sweeeeeet***

There are 11 types of people in the world. Those who can read binary, those who can't, and those who say this joke is supposed to be, "There are 10 types of people in the world. Those who can read binary and those who have a life."
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems Combining Camera Code and Driving Code cmurdoch Programming 20 10-02-2007 16:34
Enabling Multiple Light Tracking Using Kevin's Code Mitch Programming 7 05-02-2007 06:17
eclipse & Kevin's camera code dasRatsel Programming 22 17-02-2006 12:43
problems using gyro/adc code with camera default code tanstaafl Programming 7 22-01-2006 23:09
Team THRUST - Kevin's Code and Camera Code Combine Chris_Elston Programming 3 31-01-2005 22:28


All times are GMT -5. The time now is 00:23.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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