Added sensorInput.inWaiting() value to debug output to see it what is happening is that the input buffer had not been emptied and pygame or pyserial is scheduling it for service after 5 while loop iterations.