UNO + unstable PWM + Linear Led Drive

I'm really starting to dislike Fritzing. It is NOT the common language used by Electronics Hobbyists, Technicians and Engineers.

Analog.write() is a horrible trick played on the unsuspecting newcomer by the original developers. Analog.write() is supposed to be the inverse of Analog.read() and sadly it is very different. It should actually be called PWM.write(), but I guess that would be forcing the user of the command to question... what is PWM... and then we have a sticky problem... since what PWM (pulse width modulation) is, is not obvious.

PWM is technically a PULSED output at a high repetition rate. (High enough that your EYE won't really notice) The width between pulses becomes the "implied" effect voltage since, with an LED for example, if an lamp stays OFF more than it is ON, it is perceived to be DIM.

PWM does not create a VOLTAGE, per se, but it can simulate a voltage using an R/C Filter.

If you want ON/OFF and PWM control using an FET and Higher Supply voltage, this circuit should get you started.

Note: This circuit was designed for a high current LED (up to 500ma) using non-logic level mosfet. R3 will need tweaking to your design. Though to me, it could be done with just BJT's of the right value... The drawing was created to help someone else with a specific problem.