View Single Post
  #3   Spotlight this post!  
Unread 21-09-2005, 21:54
sciguy125 sciguy125 is offline
Electrical Engineer
AKA: Phil Baltar
FRC #1351
Team Role: College Student
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Sunnyvale, CA
Posts: 519
sciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond repute
Send a message via AIM to sciguy125 Send a message via MSN to sciguy125 Send a message via Yahoo to sciguy125
Re: Array problems( i think....)

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:
Code:
  pwm01,pwm02=127;
But, I guess if the compiler didn't complain, it's alright.
__________________

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GE/S/P a-- e y-- r-- s:++ d+ h! X+++
t++ C+ P+ L++ E W++ w M-- V? PS+ PE+
5- R-- tv+ b+ DI+++ D- G
------END GEEK CODE BLOCK------