View Single Post
  #1   Spotlight this post!  
Unread 04-02-2008, 22:22
EFastring EFastring is offline
Registered User
AKA: Eric Fastring
FRC #2078 (Robotic Wolves)
Team Role: Engineer
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Slidell, Louisiana, USA
Posts: 24
EFastring is an unknown quantity at this point
Gyro problems, crossposted from Electrical

in this thread I asked about testing the kit gyro and was given a programming answer, so I will continue my programming question here.

I am wanting the easiest way to test my gyro to see if it is dead.

I have the kit gyro hooked up with a PWM cable, with the white cable connected to TW(twist), the black cable connected to GB (ground), and the red cable to 5R (+5V). I plug it into the Robot Controllers Analog input 1 with the colors corresponding to those on the inputs.

In my code, under user_routines.c I have added the following

double yawtest = 0;
yawtest = Get_Analog_Value( rc_ana_in01 );
printf("yawtest %d\r", yawtest);

I get a number back that does not change (17535).

I am definitely hooked to TW (twist) and not RW (relative temperature).

At this point I am really just wanting to see a number that changes when I move the gyro chip. Am I doing something wrong or do I have a dead gyro? Is there an easier way to see if it is dead?