I tried to control the brightness of a LED using a Linear Hall Effect Sensor fed to an Arduino, and PWM output to the gate of a MOSFET connected to a 12V battery.
The LED was flickering a lot, and after some searching around, I found out that adding a 10k resistor to ground before the gate of my MOSFET solved the problem. However, I havent found a good explanation as to why this fixes the problem. Does anyone have an explanetion?