Go to Post GP and the Scout Law are high ideals that only the best will achieve and live everyday. - Al Skierkiewicz [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 10-01-2008, 08:12
marccenter's Avatar
marccenter marccenter is offline
Registered User
FRC #3548 (RoboRavens2)
Team Role: Coach
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Royal Oak
Posts: 406
marccenter has a spectacular aura aboutmarccenter has a spectacular aura about
Red face Gyro Heading always zero, yet operating?

Can I get some help in determining why the gyro heading is always ZERO but the gyro counts change when I swing the device? I have captured screen shots into powerpoint and will zip them, then attach to this message.
__________________
Marc Center
FIRST FRC Mentor/Coach - Team 3548 Royal Oak RoboRavens#2 - on Sabbatical 2017 season
marc.center@gmail.com
Mobile: 248-255-7377

Last edited by marccenter : 06-08-2008 at 09:15.
  #2   Spotlight this post!  
Unread 10-01-2008, 13:21
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Re: Gyro Heading always zero, yet operating?

I had to look up the printTextToGD function call from WPLib.

Quote:
void PrintTextToGD(unsigned char ucRow, unsigned char ucCol, unsigned long ulColor, rom const char *szText, ...);
Usually when we have a problem like yours, it is a typecast problem.
Other things to check:
Is your color valid?
Is your gyro type set correctly? You have the 300 deg/sec gyro?
What affect does the wait(200) have on your program? I always prefer to wrap my print statements in a if block for what you are trying to do:

if (time%$200 == 0)
{
printTextToGD.....
}

That way the program can continue to process gyro data, although WPLib documentation implies that sensor data is still processed during the wait.
  #3   Spotlight this post!  
Unread 10-01-2008, 14:26
artdutra04's Avatar
artdutra04 artdutra04 is offline
VEX Robotics Engineer
AKA: Arthur Dutra IV; NERD #18
FRC #0148 (Robowranglers)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2002
Location: Greenville, TX
Posts: 3,078
artdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond repute
Re: Gyro Heading always zero, yet operating?

Quote:
Originally Posted by marccenter View Post
Can I get some help in determining why the gyro heading is always ZERO but the gyro counts change when I swing the device? I have captured screen shots into powerpoint and will zip them, then attach to this message.
It sounds like the sensor is recording the change (derivative) and not the elapsed angle (integral).

If you want to get the elapsed angle, you can just add/subtract the difference every time through the loop to keep track of the absolute angle. You may have to do some simple calculations to make the sensor value you are getting back correspond directly with degrees rotated.
__________________
Art Dutra IV
Robotics Engineer, VEX Robotics, Inc., a subsidiary of Innovation First International (IFI)
Robowranglers Team 148 | GUS Robotics Team 228 (Alumni) | Rho Beta Epsilon (Alumni) | @arthurdutra

世上无难事,只怕有心人.
  #4   Spotlight this post!  
Unread 16-01-2008, 10:54
marccenter's Avatar
marccenter marccenter is offline
Registered User
FRC #3548 (RoboRavens2)
Team Role: Coach
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Royal Oak
Posts: 406
marccenter has a spectacular aura aboutmarccenter has a spectacular aura about
Re: Gyro Heading always zero, yet operating?

Hey guys, I finally got the gyro to work. It help's if you actually Start the thing.
Thread can be deleted, if desired by moderator. Thanks for CD help.
__________________
Marc Center
FIRST FRC Mentor/Coach - Team 3548 Royal Oak RoboRavens#2 - on Sabbatical 2017 season
marc.center@gmail.com
Mobile: 248-255-7377
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
Floating point math zero flippo Programming 3 09-02-2007 09:00
Keeping a certain heading using a gyro DanDon Programming 12 08-03-2006 14:27
OI and analog: Zero value Astronouth7303 Programming 1 02-02-2004 16:00
Community Zero archiver 2001 1 24-06-2002 04:08
Zero Hour archiver 2000 4 23-06-2002 21:59


All times are GMT -5. The time now is 09: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