I am not sure what the problem is, but when I run the following code, the LED connected to pin 5 does not blink. However, when I turn the LED around. It kind of works, but when the pin is low, the led turns on?! I have tried different variations of the code, different Nanos, different LEDs, but I always get the same result.
The entire circuit is just an LED with its cathode connected through a 220 ohm resistor to ground, and it anode connected to pin D5. You heard that right, the positive side of the LED is connected to ground, and it works!!!
I am not sure why this is happening, but I have been puzzling over it for the past three hours.