Mega 2560 led blink with pot analogwrite or digitalwrite?[solved]

The weird thing is the led is very faint

Nothing weird about it. INPUT pins WILL be dim. OUTPUT pins will be a lot brighter.