Go to Post It kicked off today, and we already have 10 pages of posts!?!?! - ShotgunNinja [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
  #1   Spotlight this post!  
Unread 20-02-2006, 15:58
Idaman323 Idaman323 is offline
In Theory, Our Robot Would Own.
FRC #1706
Team Role: Driver
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Wentzville, MO
Posts: 116
Idaman323 is an unknown quantity at this point
CMUCam2 not tracking

We finally got the camera hooked up, and from before, I came up with the code to have the camera track without using pots. We have our camera directly attached to a turntable and the turntable is pwm01. The code we are using is:

Code:
	if (PAN_SERVO > 210)
	{
		pwm01 = 254;
		Switch3_LED = 0;
	}

	else if (PAN_SERVO > 170)
	{	
		pwm01 = 180;
		Switch3_LED = 0;
	}

	else if (PAN_SERVO > 150)
	{
		pwm01 = 150;
		Switch3_LED = 0;
	}

	else if (PAN_SERVO > 133)
	{
		pwm01 = 140;
		Switch3_LED = 0;
	}

	else if (PAN_SERVO < 120)
	{
		pwm01 = 110;
		Switch3_LED = 0;
	}

	else if (PAN_SERVO < 100)
	{
		pwm01 = 100;
		Switch3_LED = 0;
	}

	else if (PAN_SERVO < 60)
	{
		pwm01 = 60;
		Switch3_LED = 0;
	}

	else if (PAN_SERVO < 40)
	{
		pwm01 = 30;
		Switch3_LED = 0;
	}

	else 
	{
		pwm01 = 127;
		Switch3_LED = 1;
	}
Am I suppose to put this in Process_Data_from_Master_uP() or Default_Routine()? Also, does anyone see any problems in this, or am I suppose to call any functions before this or what. Because the camera just goes to the default position and doesn't move when we turn it on. It doesn't say "searching..." or anything in the Terminal Window. The camera doesn't even tilt, so i know something is wrong. It is getting power, it is plugged into the TTL port and all of that. So any help would be appreciated since it is one of the last days

Thanks,
Idaman323
__________________
TEAM 1706
2007 Judges Award, St. Louis (For our amazing ability to have bad luck)
2005 Rookie Inspiration Award, St. Louis
 


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
CMUcam2 Serial Port Diagnostics Kevin Watson Programming 13 18-02-2006 15:05
Moving robot while tracking with camera questions... Steve Orr Programming 6 02-02-2006 22:24
Problems tracking with CMUCam2 in LabVIEW PhilBot LabView and Data Acquisition 5 17-01-2006 20:42
CMUcam2 disclaimer Cody Carey General Forum 4 12-01-2006 01:19
CMUCam2 Camera Code - Are important parts commented out? Mr. Lim Programming 4 14-01-2005 12:11


All times are GMT -5. The time now is 01:32.

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