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.