i have already tried sending the output of for loop on some other pin and using it as output pin.
Please post what you tried