Paul.... never use a while loop that you can get locked into. It could spell disaster. ie, the interrupt keeps dinging and the current keeps flowing, but the throttle never gets sampled and gets "stuck".
I would highly suggest using the uart interrupts instead of polling. I have always hated polling systems in general - especially in communication.
|