|
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.
|