Longest cable for LED

Sure, 7 meters, why not? As long as you're not using incredibly thin wire. Put the resistor on the MCU side so any shorts "out there" don't damage the MCU pin.

"what resistor" would be the same with or without the 7m wires.