Go to Post FRC is a game of mentors. The best teams are guided by mentors who know how to balance on the knife edge of pushing the envelope and achieving success. - Mr. Van [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 05-02-2008, 20:18
psy_wombats's Avatar
psy_wombats psy_wombats is offline
Registered User
AKA: A. King
FRC #0467 (Duct Tape Bandits)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Shrewsbury MA
Posts: 95
psy_wombats has a spectacular aura aboutpsy_wombats has a spectacular aura aboutpsy_wombats has a spectacular aura about
Re: Gyro Implementation

I guess I'll just clarify the steps you listed...? Although I'm not quite too sure about this, but I'll see if I can help.

1. The gyro is based off the analog-to-digital converter. So you'll want to hook up the T on the gyro to an analog input. (Make sure it's T and not R. It's not Rotation and Temperature, but Turning and Relative Temperature. Who came up with that?)

5. You need to call Process_Gyro_Data in your code to use the gyro. The referenced files contain examples of how to do this.

8. Calculating the gyro bias... You need to calibrate the gyroscope before you can use it. If you're not using Kevin Watson's new code, I believe this is the default calibration routine:
Code:
    i++;
    j++; // this will rollover every ~1000 seconds

    if (j == 10) {
        printf("\r\nCalculating Gyro Bias...\r\n");
    }

    if (j == 60) {
        // start a gyro bias calculation
        Start_Gyro_Bias_Calc();
    }

    if (j == 300) {
        // terminate the gyro bias calculation
        Stop_Gyro_Bias_Calc();

        // reset the gyro heading angle
        Reset_Gyro_Angle();

        temp_gyro_bias = Get_Gyro_Bias();
        printf("Gyro Bias=%d\r\n", temp_gyro_bias);
    }

    if (i == 35 && j >= 300) {
        temp_gyro_rate = Get_Gyro_Rate();
        temp_gyro_angle = Get_Gyro_Angle();
        printf(" Gyro Rate=%d\r\n", temp_gyro_rate);
        printf("Gyro Angle=%d\r\n\r\n", (int)temp_gyro_angle);
    }
Although I thought that was included somewhere... Make sure i and j are declared somewhere. (This should be in teleop.c or the Process Data function of user_routines.c.

9. I'd leave this alone for now. You're better off trying to get the gyro working than working optimaly, really. Save this for later.



Not entirely sure all that information is correct. If it isn't if someone could let me know? So I don't go about spreading misinformation? Thanks.
 


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
gyro captainking General Forum 4 03-02-2008 22:25
[FVC]: Gyro? Tangello_angela FIRST Tech Challenge 1 23-02-2007 18:20
Gyro magical hands Programming 2 14-01-2005 20:57
gyro odin892 Programming 0 08-04-2003 09:59
Gyro archiver 2001 2 23-06-2002 23:11


All times are GMT -5. The time now is 19:15.

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