Go to Post If you have a robot you don't need any more, use it for demos, or let a rookie team borrow it to learn wiring, programming, and demo around their school. - Barry Bonzack [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 20-02-2005, 01:35
brownster brownster is offline
Registered User
#1392 (Team Kinematrix)
Team Role: Programmer
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Ajax,Ont
Posts: 21
brownster is an unknown quantity at this point
Finding color

Hey, i've had no luck with the camera so far at all...all i want to do is have a code in autonomous that just finds green and returns a 1...the camera doesn't even have to move..it can just stand still..but just finding a color is posing trouble for me...if someone could give me a sample code..or what function i need to run and how that would be appreciated
  #2   Spotlight this post!  
Unread 20-02-2005, 03:23
russell's Avatar
russell russell is offline
Registered User
#1430 (WRONG)
Team Role: Electrical
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Anchorage AK
Posts: 402
russell is a name known to allrussell is a name known to allrussell is a name known to allrussell is a name known to allrussell is a name known to allrussell is a name known to all
Re: Finding color

Alrighty heres what I would do.
In user_routines_fast.c

at the beginning
Code:
int counter=0;
int tracking_green=0;
In the autonomous section
Code:
#if _use_CMU_Camera
if(counter=0)
  {
  camera_init(x,y,z);
  auto_servo(0);
  camera_find_color(GREEN);
  counter++
  }

if (camera_track_update()=1 && cam.size > 0)
  {
  tracking_green=1;
  }
else
  {
  tracking_green=0;
  }
#endif
then later you just have to check the value of tracking_green. Oh and remember to plug in your calibration values in that camera_init(x,y,z) function.
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
Color codes for new versions of anything? Elgin Clock General Forum 7 16-12-2004 20:16
Is this a valid technique? (Color application to metal) Elgin Clock Technical Discussion 8 09-06-2004 21:33
Whats in a team color? MisterX General Forum 11 02-04-2004 22:22
Link color Jack Website Design/Showcase 4 19-11-2002 16:31


All times are GMT -5. The time now is 10:58.

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