Quote:
|
Originally Posted by Andrew Blair
Thanks so much in advance! I hope I put that all down right. I just realized I didn't check the main processor anytime in that while loop. Could that my problem? 
|
I'm not sure if that would cause your code error, but unless the main processor read function (I can't remember what it's called off the top of my head) is called, your outputs (and inputs) never get updated.
Although, your infinite loop may be the cause of the code error:
Code:
if (p2_sw_trig==1)
{
i=0;
i++;
while( i<90)
{
left_side[i]=p1_y;
right_side[i]=p2_y;
}
i is never incremented in the while loop, so i<90 is always true. I'm also not sure if this is legal:
But, I guess if the compiler didn't complain, it's alright.