View Single Post
  #2   Spotlight this post!  
Unread 12-02-2004, 23:06
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: printf isn't printf-ing. Help!

Quote:
Originally Posted by Meandmyself
Code:
  /*way up at the beginning of the file...*/
  char counter = 0;

  /*in process_data_from_master_uP*/
gyroin = get_analog_value(rc_ana_in_01);
if (counter > 40) {
     printf("%d, %d \n",gyroin,get_analog_value(rc_ana_in_01));
     counter=0;
}

counter++;
Is "counter" a global variable? Put a printf outside the "if(counter > 40)" line and see if counter is ever actually greater than 40. I suspect that's where your problem lies.