Sorry, that won't compile. You have declared i, but not I, and you have set pin equal to 'l', having never declared it as a variable.

Please post up the code that you're actually using - we can't...