Go to Post I wish I were on the GDC, just to watch everyone struggle to grasp the meaning of this. - Brandon_L [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 Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 28-02-2008, 23:26
g_less1902 g_less1902 is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Nov 2007
Rookie Year: 2007
Location: Orlando
Posts: 7
g_less1902 is an unknown quantity at this point
Gyro Results

Hi,

Below is an EasyC sample program to test our ADXR300 from Sparkfun.
When I manually rotate the gyro 90 degrees, the result I get is about 35 degrees.

We tested the 80Deg/s from this years kit, and the 150Deg/s from last years kit, and they work correctly in EasyC.

In ChiefDelphi there is a thread to multiply the answer by 2.5.
But it doesn't look like it is correct.

I tried using Kevin Watsons IFI code in MPLab, and the gyro works correctly,
and I get expected results, however all of our code has been built with EasyC.

I downloaded the Jan 2008 WPILib libraries, and installed it in EasyC, but still don't get the expected results.

Is there something I am done incorrectly?

Thanks,
Eric Grajales



#include "Main.h"

void main ( void )
{
int gyroval = 0;
long cnt = 0;

SetGyroType ( 1 , ADXRS300 ) ;
InitGyro ( 1 ) ;
Wait ( 2000 ) ;
SetGyroDeadband ( 1 , 5 ) ;
StartGyro ( 1 ) ;
while ( TRUE )
{
gyroval = GetGyroAngle ( 1 );
if ( (cnt % 5) == 0 )
{
PrintToScreen ( "GyroVal = %d\n" , gyroval ) ;
}
cnt = cnt + 1;
// Arcade2 ( 1 , 2 , 1 , 1 , 3 , 1 , 0 , 0 ) ;
Wait ( 100 ) ;
}
}
 


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
arm-limitting gyro PD loop producing some strange results ZZII 527 Programming 8 16-02-2005 02:30
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 20:24.

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