View Single Post
  #7   Spotlight this post!  
Unread 15-10-2004, 19:41
colt527 colt527 is offline
Registered User
AKA: Ken Colton
FRC #0527
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Long Island
Posts: 123
colt527 is a splendid one to beholdcolt527 is a splendid one to beholdcolt527 is a splendid one to beholdcolt527 is a splendid one to beholdcolt527 is a splendid one to beholdcolt527 is a splendid one to beholdcolt527 is a splendid one to behold
Send a message via AIM to colt527
Re: No Signal From Gyro

Ok, here is the latest updates from our Attempts at getting a signal from the Gyro. Here is all our autonomous code is:

Code:
//VARIABLES DECALARED AT TOP

unsigned long int gyro_input;

void User_Autonomous_Code(void)
{
  /* Initialize all PWMs and Relays when entering Autonomous mode, or else it
     will be stuck with the last values mapped from the joysticks.  Remember, 
     even when Disabled it is reading inputs from the Operator Interface. 
  */
    pwm01 = pwm02 = pwm03 = pwm04 = pwm05 = pwm06 = pwm07 = pwm08 = 127;
    pwm09 = pwm10 = pwm11 = pwm12 = pwm13 = pwm14 = pwm15 = pwm16 = 127;
    relay1_fwd = relay1_rev = relay2_fwd = relay2_rev = 0;
    relay3_fwd = relay3_rev = relay4_fwd = relay4_rev = 0;
    relay5_fwd = relay5_rev = relay6_fwd = relay6_rev = 0;
    relay7_fwd = relay7_rev = relay8_fwd = relay8_rev = 0;

  while (autonomous_mode)   /* DO NOT CHANGE! */
  {
    if (statusflag.NEW_SPI_DATA)      /* 26.2ms loop area */
    {
        Getdata(&rxdata);   /* DO NOT DELETE, or you will be stuck here forever! */

        gyro_input = Get_Analog_Value(rc_ana_in01);
        printf("gyro: %d",(int)gyro_input);
		
        Putdata(&txdata);   /* DO NOT DELETE, or you will get no PWM outputs! */
    }
  }
}
And we get in out output from the printf "Gyro: 0". I can't make it any simpler! and its absolutly driving me up a wall! What could possible be wrong other then our FRC hates me and is broken in some way....does anyone out there have any thoughts on why this thing might still not work. Even if its something incredibly simple that you assume all teams should know please tell. Thanks again.

I also remember right before the 2004 competition FIRST released an unpdate for the controller that we never did.... did that have anything to do with analog inputs?

PS. Currently we are meeting after school on Fridays @ 2:00pm, and we sometimes meet during the week just to work on some small things, so if we cant get it working soon maby it would be best if you stop by and have someone who really knowns what they are doing (ie. not ne one from our team) look at it.
__________________
Mentor, Team 527 -- Plainedge Red Dragons
FIRST Volunteer
SUNY Stony Brook Computer Science 2010
kcolton@gmail.com

Last edited by colt527 : 15-10-2004 at 19:47.