Does this match the value on the serial monitor?
Try putting a "delay (50);" before the closing } of loop().