So I'm building a simple circuit with a NMOSFET and an LED as a load. The whole purpose of this circuit is that the mosfet regulates the current going into the LED, cutting off and opening up the power to the LED over and over again. After 36 hours of debugging, I have come to a conclusion that the arduino isn't outputting 0 - 5V on the pin but instead it's outputting 0 - .02 V is what my DMM is reading. As you guys know, MOSFETS require a good amount of voltage to change it's logic level. I have checked my wiring, tried different ports, tried multiple boards (Uno, Mega, and Nano) and all of them are outputting the same voltage, and I also doublechecked to make sure I set the pin mode to output.
I tried with just writing High and Low to the pin with a 1 sec delay. Still the same thing. I also read the pin directly with the multimeter while it was set to high continously.
Of course you need the delay in the right place, or you need two delays (on for high and one for low) but continuous high should work.
Is your multimeter directly-connected between the I/O pin and Arduino's ground?
Does this happen when you disconnect everything except the multimeter?
Does the Blink Example work? If so, what happens when you connect your LED driver circuit to Pin 13 (same pin as the built-in blinking LED)?
It's possible that your Arduino is fried or it's possible that you've still got mistakes in your code, or maybe your attached circuit is wrong and "shorting" the output-pin.
Its active low and actually thank you @LarryD that was my problem. Didn't realize there needed to be a ground connection between arduino and mosfet as the arduino was already grounded!
You might want to remove the concept of "ground" from your mind. Replace it with "common".
Every circuit has a common and the common for circuit 1 need not be the common for circuit 2 unless they are connected.
Consider the common of a circuit as a float in the water. You could easily push something off the float into the water. However if that object was on a different float you could not push it off the other float, the float would just move away.
Then you connect the two floats together, now you can push the other object off the other float.
The connection between the two floats is the connection you were missing in your original circuit.