View Single Post
  #2   Spotlight this post!  
Unread 04-02-2008, 13:37
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Testing the Kit Gyro?

Quote:
Originally Posted by EFastring View Post
I tried hooking up a PWM cable to analog input 1, and connecting it to the gyro (white to TW, black to GB, red to 5R) and adding a printf line to user_routines.c to display rc_ana_in01.

I get a constant output of 135 regardless of if I twist the gyro or even have it plugged in.

Does the gyro need to be initialized, calibrated, etc. before it will function at all, is my printf referencing the wrong variable, or am I doing something else wrong to see if the gyro is simply functioning at all?
rc_ana_in01 is a constant. You have to use Get_Analog_Value( rc_ana_in01 ) in order to get the actual analog value.