Quote:
|
BTW, the two relay bytes are deliberately interspersed in the serout command between PWMs 1, 2 and 3 to prevent 255s output to PWMs from causing problems in the most common cases where someone is using the default code (or has made minimal modifications to it.)
|
Actually, they are interspersed to prevent problems from occurring when both relay output bytes are 255. A change from 255 to 254 will make almost no difference with the analog PWM outputs, but changing this in a relay output would completely reverse one of the digital output pins, most likely causing very undesired operation. Also, if i remember correctly, the default code sets a maximum of 254 for all the PWM outputs it uses.
My guess is that somewhere else you are doing one of 5 things:
1. getting stuck in an infinite loop
2. taking too long on part of your code. This could be caused by a loop that is ran multiple times or from several debug statements
3. skipping over your serout statement
4. you are using the serout statement incorrectly.(i.e. outputting to the wrong pin, etc.)
5. not looping back to your serin command.
It is hard to say without seeing the rest of your code. If you could post all of the code, it would be very helpful in determining your problem.
[edit] added a 5th item [/edit]