Go to Post Like a moth to a flame, true FIRSTers are attracted by the Victor instead of the Banner. - Rich Wong [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 13-01-2007, 15:37
Inverted Inverted is offline
Registered User
AKA: Eric P.
FRC #1228 (Robo Tribe)
Team Role: College Student
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Rahway, NJ
Posts: 25
Inverted is an unknown quantity at this point
Send a message via AIM to Inverted
Angry Please help. I've had it with this camera

Ugh. Fir the past 3 years I've been trying to get the camera to track the light, and every year I just can't get it. This year I managed to get the camera to recognize the color and track it, but I can't get the servos to move it. I download the easyC camera test program and downloaded to the robot, but it doesn't seem to do anything. I set the variables for the left and right drive motors equal to the respective PWM ports, but I can't seem to find where the pan and tilt servo pwm ports are defined. When I download the program to the bot, it doesn't do anything. In autonomous, neither the servos nor the wheels move, and in regular mode the joystick has no control over the wheels; the bot is just dead.

I'm at a loss right now. I don't know what I'm supposed to do with the program or how it's supposed to work. Furthermore, I have no desire to do programming this year, but unfortunately I'm the only person on the team who knows how to and I have to train younger members how to.
  #2   Spotlight this post!  
Unread 13-01-2007, 17:21
Binome's Avatar
Binome Binome is offline
Programmer/Electronics/CAD
AKA: Patrick
FRC #2273 (SHIM)
Team Role: Leadership
 
Join Date: Dec 2006
Rookie Year: 2007
Location: Surrey,BC
Posts: 105
Binome is a glorious beacon of lightBinome is a glorious beacon of lightBinome is a glorious beacon of lightBinome is a glorious beacon of lightBinome is a glorious beacon of light
Re: Please help. I've had it with this camera

for easyc code, servo ports 10 and 11. for kevins code, 1 and 2
I managed to hack around with the given code, and got it to track pretty easily. Don't expect everything to be given to you, and read some more about C. It's a fairly complex language, but extremely powerful

Last edited by Binome : 13-01-2007 at 17:23.
  #3   Spotlight this post!  
Unread 13-01-2007, 18:08
AdmiralAllen's Avatar
AdmiralAllen AdmiralAllen is offline
Master of Computers and Robots
AKA: Allen Worcester
FRC #1662 (Raptor Force Engineering)
Team Role: Alumni
 
Join Date: May 2006
Rookie Year: 2005
Location: California
Posts: 37
AdmiralAllen will become famous soon enough
Re: Please help. I've had it with this camera

I'm having a very similar problem....
the camera follows the light.... but how do i get the whole robot to go twoards the light, and still be able to change direction or stop when it gets close?
  #4   Spotlight this post!  
Unread 13-01-2007, 18:55
rodgadashruba rodgadashruba is offline
Registered User
FRC #0611
 
Join Date: Jan 2006
Location: McLean
Posts: 17
rodgadashruba is an unknown quantity at this point
Re: Please help. I've had it with this camera

after messing with the camera some, the camera will return the values for the servos... now that u have the values, you need to determine the angles and have the robot to move according to those values, I do not have the code to look at now, but when i get a chance I will post some code snippits that might help
  #5   Spotlight this post!  
Unread 13-01-2007, 19:13
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: Please help. I've had it with this camera

It's probably the easiest to drive with the centroid value. So, in easyC you can use the two/four wheel wheel drive function and in MPLAB you can using the mixing value.

If you do:

Set you gain low and work your way up. Your robot should drive to
the target with this. Your best is to only have it track only one thing at a time. Center - Drive - Center - Drive....

Error_Y = (Centriod_Y_Target - Centriod_Y_Current);
Rotation = (Error_Y * Gain_Y);

Error_X = (Centriod_X_Target - Centriod_X_Current);
Speed = (Error_X * Gain_X);



QUOTE=AdmiralAllen;555954]I'm having a very similar problem....
the camera follows the light.... but how do i get the whole robot to go twoards the light, and still be able to change direction or stop when it gets close?[/quote]
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni
  #6   Spotlight this post!  
Unread 14-01-2007, 22:30
charrisTTI charrisTTI is offline
Ramblin' Wreck
AKA: Charles Harris
FRC #0623
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Vienna, VA
Posts: 106
charrisTTI has a spectacular aura aboutcharrisTTI has a spectacular aura about
Send a message via AIM to charrisTTI
Re: Please help. I've had it with this camera

Do you have the backup battery installed? The blue one. The servos are not powered unless the backup battery is installed. The 12V supply to the RC does not power the servos.
__________________
FRC 623 2003,2004,2005,2006,2007,2008, 2009, 2010, 2011
FRC 1900 2007
FVC 60 and 193 2006
FVC 3271 2007
FTC 226 and 369 2008, 2009, 2010, 2011
FTC 3806 2010
  #7   Spotlight this post!  
Unread 14-01-2007, 22:35
bobmonkey836's Avatar
bobmonkey836 bobmonkey836 is offline
BobMonkey07
AKA: Jeff Powers
FRC #0836 (Robobees)
Team Role: Mentor
 
Join Date: Dec 2005
Rookie Year: 2005
Location: maryland
Posts: 39
bobmonkey836 is on a distinguished road
Re: Please help. I've had it with this camera

so everyone wants their robot to go towards the light? well, at least it's green, not white.
__________________
Solution to life's problems: "CTRL", "ALT", "DELETE".
"CTRL"+"Z" Saved my life.
Approximately Normal
2007 Annapolis Regional at USNA!!

Management is doing things right; leadership is doing the right things.
- Peter Drucker
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
Premiere won't recognize camera - please help sanddrag IT / Communications 9 04-01-2007 20:17
please help me to plag in the camera CompMaster Programming 1 16-02-2006 11:24
HELP! I've gotta come up with a radio show! Billfred Chit-Chat 13 01-09-2004 19:45
What is wrong with this code???? It won't Compile and I don't know why? Please Help CrashZero Programming 23 26-03-2004 09:44
Ahhhh! I've had it with 3dstudio max! AnnyRob 3D Animation and Competition 6 29-01-2002 11:23


All times are GMT -5. The time now is 20:47.

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