PWM problems when controlling a MOSFET gate

I am working on a project that involves using an Arduino to control the brightness of an led. The LED takes in 12v to power, so I am using an external power source and connecting it to the ground via a MOSFET controlled by my Arduino Uno.

This issue: no matter what component I try to power, it “flashes” whenever the analog pin output is an intermediary value (i.e. not 0 or 255). Interestingly, the brick in my power source has an LED that will start to flash the same way.

I am confused why the lights work perfectly on full power but have this flashing issue when PWM techniques are used. I attached a diagram of my setup, so any help would be appreciated.

Thank you!

Also, here is the datasheet for the transistor:

PS I come from an all software background, so I would appreciate hardware explanations in layman terms

You need the correct MOS FET, that one needs 10 volts to turn on.

Make sure your load does not need current limiting.
Use a logic level transistor.
Use a gate resistor.
See the Q3 circuit.

Outputs.jpg Click on the image for full resolution.

That particular MOSFET won't work properly with Arduino, because it requires 10V on the gate to turn it on fully. Use a logic level MOSFET, like this one.

Always use a current limiting resistor between the output pin and the gate, 150 Ohms minimum.

If the power supply LED is blinking, that may mean that the supply is overloaded.

Sparkfun has logic level mosfets.

WHAT "analog pin output" ?