View Single Post
  #10   Spotlight this post!  
Unread 23-09-2003, 21:10
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,567
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
I think it is unlikley that setting the pwm values to 255 is causing the problem. But, it depends on what PWM values the variables correspond to. If this was the problem, you'd have a problem sometime into running the program, not on download.

how big is dist and whlc and do you overrun anything when adding them together? Same thing, this shouldn't cause the error, but is something to look into.

I think the most likely cause was already mentioned by Ian. If you tried to read in a new sensor, but didn't define the constant saying that you want to read it, your serin will be mismatched with the initialization. Look at the section of the code labled "DEFINE CONSTANTS FOR INITIALIZATION"

It would also be helpful to see more of your code if one of the suggestions doesn't help.