Go to Post Instead of lowering a team's expectations, let's raise the amount of competitive resources available to them. ;) - artdutra04 [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 16-05-2006, 22:27
Project X Project X is offline
Registered User
FRC #1862 (Red Knights), FRC #2070 (Ridgefield Robotics)
Team Role: Alumni
 
Join Date: Mar 2006
Rookie Year: 2005
Location: New Jersey
Posts: 7
Project X is an unknown quantity at this point
gyro/camera question

My team was using Easy C during the regionals with a dumper style robot and it worked great. During the off season we have modified the robot to be a shooter, and are trying to make it shoot during autonomous. We are using Easy C, and it is working fairly nicely, but I have a few questions.

There a drive function set up, which was taken from the camera code that came with Easy C. We have installed the gyro sensor, and it is working fine, but the question is how do you get the robot to turn a set amount of degrees (ex:90 degrees)? I have tried this but have not succeeded, and am curious to find out how this is done.The value the gyro is giving out is being called "heading".

The second question has to do with the camera. As of now the camera is tracking without the servos, but I would like to know how can we start the servos while tracking? In the servo option under the camera, when the value is either 0 or 1 for the pan and tilt servos, I am assuming this means that the servos are either on or off. When I tried putting both to 1, the servos were not being used.

Any help will be greatly appreciated.
__________________
  #2   Spotlight this post!  
Unread 17-05-2006, 08:57
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: gyro/camera question

1.
For the gyro your best bet is to print the value it returns to the screen and then
turn your robot. Use the value it returned to specify a heading.

Gyro_Target = 90
Spin = GyroHeading - Gyro_Target

You could dump spin into the drive functions used in the tutorial that came with
easyC

2.
The servos should track when set to 1. You probably have to drag in the "start Camera" block after you set the servos. If its not working you can command the servos to move to a position if they don't move something is wrong with your setup.
  #3   Spotlight this post!  
Unread 17-05-2006, 18:37
Project X Project X is offline
Registered User
FRC #1862 (Red Knights), FRC #2070 (Ridgefield Robotics)
Team Role: Alumni
 
Join Date: Mar 2006
Rookie Year: 2005
Location: New Jersey
Posts: 7
Project X is an unknown quantity at this point
Re: gyro/camera question

The turning with the gyro is working great, and the servos were not working because they were set after the "start camera" block.
Thank you very much.
__________________
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
camera question naor52 Programming 8 03-02-2006 00:07
problems using gyro/adc code with camera default code tanstaafl Programming 7 22-01-2006 23:09
Camera Question fred Control System 3 13-02-2005 14:25
Camera Question fred Electrical 3 13-02-2005 14:25
Gyro/Balance question MattK General Forum 10 21-09-2003 19:43


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

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