Help me, PWM does not work

I need to use the PWM and control it from my computer, but does not work. I send data from the computer to the Arduino, I keep it in a variable and then sent it to pwm, but does not work, help please.

Code would help..

code?

Is the pin you are using actually one of the pins that supports PWM? Not all Arduino pins are PWM capable.

I send data from the computer to the Arduino, I keep it in a variable and then sent it to pwm, but does not work, help please.

Not to be too critical, but everyone knows PWM works! Marco_c hit on the fact that not all pins support PWM and the PWM pins vary by Arduino model of uC. Pictures of Arduino various models with pin out: https://www.google.com/search?q=arduino+uno+pinout+pwm&source=lnms&tbm=isch&sa=X&ei=cVxUU-6GEZHMsQT4ioCIAw&ved=0CAYQ_AUoAQ&biw=800&bih=1232

Pick your model, identify pins, use an example sketch to load a variable with a value and test... Maybe use the onboard LED. Then read the keyboard into a variable and try again. When one thing works and one thing does not, investigate the difference (like keyboard characters are not integer numbers!!!)

Ray