Arduino Dimmer Example has serial read issues

I found a similar thread but there was no answer and it is several years old...

my basic question is how to get the LED/PWM dimming example code to accept 3 digits (255) over serial.

Right now the program simply executes the analogwrite function before it receives all 3 characters. I have tried everything I know with no luck. The only fix I have found involved mapping everything to the 0-9 keys. Works but doesn't allow for proper brightness resolution that the true 0-255 will.

What am I missing??? I know it is simple because I used to do this with servos etc. via PIC microcontrollers in my sleep.


Well we are missing your code.
Please post what you have so far. Please use code tags. If you don't know what that means please read the how to use the forum sticky post.

I never saved it. I was using the example straight from the example library... Ill dig it back out so I can post it. Thanks!