Go to Post And the only person who could really save my butt, Brandon Martus... is sitting across the table from me. Laughing. - Amanda Morrison [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 13-02-2007, 10:47
pheadxdll pheadxdll is offline
Registered User
AKA: Alex
FRC #1225 (Amperage Robotics)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2006
Location: North Carolina
Posts: 168
pheadxdll has much to be proud ofpheadxdll has much to be proud ofpheadxdll has much to be proud ofpheadxdll has much to be proud ofpheadxdll has much to be proud ofpheadxdll has much to be proud ofpheadxdll has much to be proud ofpheadxdll has much to be proud ofpheadxdll has much to be proud of
Re: Where do I begin to get the robot to move using the camera?

I know what it feels like to work so many roles. I'm the eletriction, programming, and website guy on our team. Let's see if I can help you any:

Have you tested your code at all or are you just trying this out?

I have found that the CAMERA_ON_TARGET state doesn't work to well. Even if the camera has located the target and its pointing directly at the target, it will modulate and will toggle off and on within state which won't even turn on a relay. Do something like:

Code:
if(Get_Camera_State()) 
{  // You don't need the 1. Anything positive will trigger it.

if((Get_Tracking_State() != SEARCHING && (Find_Distance() > set closest range))
 {
			pwm01 = desired forward velocity;
			pwm02 = same forward velocity;
			Switch3_LED = 1;
}else if((Get_Tracking_State() != SEARCHING) && (Find_Distance() <= set closest range)) {
			pwm01 = 127;
			pwm02 = 127;
			Camera_Idle(); //Sets Camera in OFF mode so manual mode can continue.
			Switch3_LED = 0;
		} else {
			Switch3_LED = 0;
		}
}
This routine is running continously so the camera will update its distance and will stop once in the proper range. I'm not sure how to answer your CAMERA_IDLE and reset questions. Atonomous mode is only 15 seconds so I'm not going to bother with disabling the camera. If you have it running during gameplay that's another story..

The switch leds are really unessicary. Those turn on LEDs on the OI when the camera is on target. I took then out because we won't be looking down too much during the game.

When you start getting down to coding the specifics of the routine, post again and we'll help.
__________________
Amperage Robotics Team 1225
Site under-going revamp. :/

Last edited by pheadxdll : 13-02-2007 at 10:52.
 


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
Building the field :: where can I get the carpet? Armando Gonzalez Technical Discussion 10 12-01-2007 14:14
Where in the world is the new 2007 cmu camera docs?!?!? xrabohrok Programming 13 08-01-2007 20:28
Where do we get more extention wires for the Vex robot? pbrules15 Technical Discussion 5 27-01-2006 07:48
how do u figure out the torque req'd to move a robot? Salik Syed Technical Discussion 11 03-11-2004 08:12
Using Robotics to get the girl necroprime Chit-Chat 66 21-03-2003 23:21


All times are GMT -5. The time now is 06:16.

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