I am working on a web server. I need to use PWM, instead of Switching the led. As of now When hit http://192.168.4.1/OFF it turns of the LED. Instead of this I will be sending random values to for PWM. For example http://192.168.4.1/255 and will be writing the value after the "255" to analogWrite(5, val);. How to do that.
Here is the code for switching the led :